home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / advent1b / advman.doc < prev    next >
Encoding:
Text File  |  1993-10-11  |  99.1 KB  |  2,851 lines

  1. READ THE FOLLOWING INFORMATION CAREFULLY.
  2.  
  3. The Advent system (with the exception of PLAYA.EXE) is
  4. Shareware.  This means that you may distribute Advent to
  5. other potential users, according to the normal Shareware
  6. rules:
  7.  
  8. 1.   No charge should be made for Advent.
  9.  
  10. 2.   If a charge is made it must be stated clearly that
  11.      the charge has been made to cover copying and media
  12.      costs, and that the Advent system has not been
  13.      purchased.
  14.  
  15. 3.   All copies must include all the program,
  16.      documentation and example files.
  17.  
  18. Beware of viruses.  It is a sensible precaution to check
  19. any disk for viruses before you give it away.  You should
  20. also check new floppy disks before using them on your
  21. machine.
  22.  
  23. I can accept no responsibility for any damage to
  24. hardware, software or data which comes about by the use
  25. of any copy or version of the Advent system.
  26.  
  27. Users of Advent should register their copy by sending £20
  28. to:
  29.  
  30. S. Morphet,
  31. 49 Meadowfield Road,
  32. Stocksfield,
  33. Northumberland,
  34. ENGLAND.
  35. NE43 7PZ.
  36.  
  37. Payment should be made out to 'Mr. S. Morphet.'
  38.  
  39. If possible, please send the revision number of your
  40. version of Advent.  This number is obtained by typing:
  41.  
  42. ADVENT /V
  43.  
  44. at the DOS command line.
  45.  
  46. As a registered user you will be eligible for support and
  47. advice on Advent, a printed manual, and update
  48. information.
  49.  
  50. The PLAYA.EXE program is used to play a finished game,
  51. and as such should be distributed with any game that the
  52. user creates with Advent, and subsequently offers for
  53. sale, or for distribution as Shareware, in the Public
  54. Domain, etc.  For this reason the PLAYA.EXE program is
  55. released as Public Domain software.  Again, no charge
  56. other than a copying fee must be made for PLAYA.EXE, and
  57. users of PLAYA.EXE are not required to register it.
  58. __________________________________________________________
  59. __________________________________________________________
  60.  
  61.  
  62. ADVENT USER MANUAL - PART 1.
  63.  
  64. ADVENTURE GAMES.
  65.  
  66. Nothing beats a good adventure of an evening.  Wouldn't
  67. you rather be fighting your way through jungle
  68. undergrowth, devising cunning means of crossing swollen
  69. rivers, swinging intrepidly across snake filled pits, and
  70. dodging the poison yo-yos wielded so expertly by tree
  71. dwelling rabbits, instead of reading this?  Perhaps it
  72. all sounds a bit much?  Too dangerous perhaps?  Or maybe
  73. you can't afford the plane ticket?  Never mind, a
  74. computer adventure game allows you to explore, solve
  75. puzzles, or even do battle with rabbits if you should so
  76. wish, all without leaving the comfort of your VDU!
  77.  
  78. Most people have played an adventure game at least once,
  79. they even appear occasionally on magazine 'cover disks',
  80. but how many people have ever designed and written their
  81. own?  The Advent software allows you to create
  82. complicated adventure games with absolutely no prior
  83. computer programming knowledge.  Simply give the computer
  84. a list of the places and objects in the game, and tell it
  85. the rules!
  86.  
  87. If you do not have at least some experience of adventure
  88. games it would probably be a good idea to try a couple
  89. before you start to write your own.  This will give you a
  90. good idea of the way that they work, the sorts of puzzles
  91. encountered etc...
  92.  
  93. When you have written your adventure game you may
  94. distribute it according to the rules set out in Appendix 5.
  95.  
  96.  
  97. INSTALLING AND RUNNING ADVENT.
  98.  
  99. Advent V1.0 is usually supplied on one 3╜" (720K) disk,
  100. this may differ according to the source of the disk.  Some
  101. shareware libraries may be able to supply the system
  102. (compressed) on a 5╝" (360K) disk.
  103.  
  104. Whatever the disk format, you may find that the system has
  105. been compressed.  In this case the shareware library should
  106. provide instructions for decompressing them.
  107.  
  108. Advent should run on any I.B.M. P.C. or compatible computer
  109. with 512K RAM.  The software adapts to the graphics adapter
  110. in use, working in 80 column text mode, which is supported
  111. by all P.C.s.  Monochrome and colour screens are supported.
  112.  
  113. Four program (.EXE) files are provided on your Advent disk,
  114. or in a compressed file.  These are ADVENT.EXE, the
  115. database editor, PLAYA.EXE the interpreter, and the utility
  116. programs ADVLOCK.EXE and ADVPACK.EXE.
  117.  
  118. You will use ADVENT to create your adventure game, and
  119. PLAYA to play it when complete.  ADVENT also makes
  120. calls to PLAYA in order for you to test the adventure during
  121. development.
  122.  
  123. Advent requires no special installation.  First you should
  124. make a copy of the ADVENT disk, and put the original
  125. away in a safe place.  You can then use ADVENT without any
  126. fear of corrupting the programs.
  127.   
  128. The disk may contain a README file containing late-breaking
  129. news that is not contained in this manual.  You should read this
  130. file before using Advent.
  131.  
  132. If you use a hard disk drive, you should copy the all ADVENT
  133. files into a single sub-directory of your hard disk and this will
  134. considerably increase the speed of the system.
  135.  
  136. Advent can be used from floppy disks.  On a system with 3╜"
  137. disks, all the program files can be stored on and run from a
  138. single disk.  Data can be stored on another disk and Advent
  139. will prompt for disk changes if required.
  140.  
  141. On a system with low density 5╝" (360K) disks, the programs
  142. ADVENT.EXE and PLAYA.EXE should be copied onto one
  143. disk, and the programs ADVLOCK.EXE and ADVPACK.EXE
  144. onto another.  The system is then run from the first disk, and
  145. he second disk is inserted when ADVPACK or ADVLOCK
  146. are to be run from the DOS prompt.  Data can be stored on a
  147. further disk as described above.
  148.  
  149.  
  150. THE ADVENT SYSTEM.
  151.  
  152. As has already been mentioned, there are four programs
  153. that comprise the ADVENT system.  The program ADVENT.EXE
  154. is the database editor.  A database is the name given to
  155. the two files that comprise any game you create, these
  156. files are stored on disk.  One, with the file extension
  157. .DAT is called the data file, and contains text data and
  158. the `rules' of the game.  The second has the extension
  159. .IDX and is used as an index to the data file, allowing
  160. the appropriate data to be found rapidly.
  161.  
  162. The database editor program guides you through the
  163. creation and development of such a database with the
  164. minimum effort.
  165.  
  166. The second program on the programs disk is called
  167. PLAYA.EXE, this is the Interpreter, the program which
  168. interprets the database, and allows you to play the games
  169. that you have created.  PLAYA.EXE is also used if you
  170. wish to test your adventure game during development.
  171. Running PLAYA.EXE from the ADVENT database editor
  172. environment allows you to use additional facilities to
  173. control and monitor the way in which the system is
  174. working.
  175.  
  176. The last two programs on the disk are less important, but
  177. help you to produce top quality games suitable for
  178. distribution.
  179.  
  180. ADVLOCK.EXE allows you to apply a password lock to your
  181. database.  This does not prevent users from playing the
  182. game, but means that another user with the Advent editor
  183. cannot make unauthorised changes to your database.  See
  184. the section in Part 3 of this manual 'Other programs
  185. supplied with Advent.'
  186.  
  187. ADVPACK.EXE is a program which removes any inefficiency
  188. in the storage of data in your data files.  As you edit
  189. data, gaps may be left in the data file, perhaps wasting
  190. a tiny bit of space each time.  ADVPACK removes these
  191. spaces, but does not compress real data, which means you
  192. can still edit your database.  The program also reorders
  193. database entries as explained in Part 3 'Other programs
  194. supplied with Advent.'
  195.  
  196.  
  197. INTRODUCTION TO THE ADVENT DATABASE EDITOR
  198.  
  199. RUNNING ADVENT.
  200.  
  201. To run Advent, make sure you are in the directory
  202. containing the Advent files, type ADVENT and press RETURN
  203. on the DOS command line.  This will load the database
  204. editor program into memory.
  205.  
  206.  
  207. THE MAIN MENU.
  208.  
  209. All the menus in Advent are operated using the cursor
  210. keys to move the highlight bar to the desired option,
  211. then press RETURN to make a selection.
  212.  
  213. The Advent database consists of a variety of texts and
  214. tables of information.  Each type is accessed via the
  215. main menu:
  216.  
  217.  
  218. VOCABULARY.
  219.  
  220. This option allows you to control the words which the
  221. computer understands, in other words, its vocabulary.
  222. Every word is allocated a number by which the interpreter
  223. recognises the word.  You may also specify SYNONYMS, ie,
  224. different words which have exactly the same meaning to
  225. the computer.
  226.  
  227.  
  228. MESSAGE TEXT.
  229.  
  230. When an incident occurs in the adventure, the player
  231. needs to be told about it.  Message texts allow this to
  232. happen.  Typical messages may be,
  233.  
  234. "You throw the boomerang away, but it swiftly returns,
  235. try as you might you just can't get rid of the thing."
  236.  
  237. or,
  238.  
  239. "The telephone rings."
  240.  
  241.  
  242. LOCATION TEXT.
  243.  
  244. Here you are able to enter and amend the texts which
  245. describe the locations in the adventure.  Every location
  246. could be thought of as a room, upon entering the room a
  247. message is displayed describing it, for example:
  248.  
  249. "You find yourself in the bathroom.  A large hairy spider
  250. peers at you out of the bath, and looks ready to pounce."
  251.  
  252. or,
  253.  
  254. "You are inside the sea slug.  It's digestive workings
  255. look alarmingly hungry.  The walls are decorated with
  256. cool pink slime."
  257.  
  258. Obviously, whilst the location texts will often refer to
  259. rooms, they need not do.  A street, tree, country, cavern
  260. or slug interior are all equally valid.
  261.  
  262.  
  263. THE MOVEMENT TABLE.
  264.  
  265. In the movement table you describe the connections
  266. between locations, or if you like, the doors between
  267. different rooms.  A movement table entry exists for every
  268. location, and tells the interpreter where the player will
  269. end up if certain commands, usually directions such as
  270. NORTH or SOUTH, are entered whilst at that location.
  271.  
  272.  
  273. OBJECT TEXT.
  274.  
  275. Every adventure has objects in it, things that the player
  276. can manipulate, move around, and use to solve problems.
  277. A torch, for example is a handy thing to be carrying when
  278. the lights go out!  The objects are each identified by a
  279. short text, the OBJECT TEXT.
  280.  
  281.  
  282. OBJECT START LOCATION.
  283.  
  284. When the game starts the objects will be distributed
  285. around the various locations.  The object start location
  286. gives the location number of the location where each
  287. object is situated at the beginning of the game.
  288.  
  289.  
  290. THE EVENT AND STATUS TABLES.
  291.  
  292. The event table, together with the status table, defines
  293. the rules by which the game is played.  In the event
  294. table, players commands, usually in the form VERB-NOUN,
  295. are associated with a series of actions, which will be
  296. executed if certain conditions are met at the time when
  297. the command is entered.  The status table works in a
  298. similar way, but the execution of the actions depends
  299. only upon the conditions which must be met, and not on
  300. the commands entered by the player.
  301.  
  302.  
  303. SYSTEM MESSAGES.
  304.  
  305. These are similar to MESSAGE TEXTS but are displayed by
  306. the interpreter during game play, for example to prompt
  307. the player for input, to tell them that it is dark, or to
  308. warn the player if the interpreter doesn't understand its
  309. instructions.  Each message can be changed to suit your
  310. preferences but should always retain the same meaning.
  311.  
  312.  
  313. OBJECT WORDS.
  314.  
  315. The AUTO* actions in the event table can save you a lot
  316. of typing.  They require objects to be associated with a
  317. word from the vocabulary, and that word is set using this
  318. option.
  319.  
  320.  
  321. TEST ADVENTURE.
  322.  
  323. This option allows you to test your adventure from within
  324. the editor environment, by making a call to the
  325. interpreter program PLAYA.EXE.  The testing process uses
  326. exactly the same program as will be used when you
  327. actually play the game, so you can be sure that whatever
  328. happens during testing will be what happens in the game
  329. proper.  In the test mode you also have the option to
  330. display the states of up to forty of the four hundred
  331. flags used by Advent.  This diagnostic feature allows the
  332. easy correction (or debugging) of your game when things
  333. go wrong.
  334.  
  335.  
  336. EXIT ADVENT.
  337.  
  338. Advent saves your data as you work.  Data is stored on
  339. disk as it is entered, and the index data is updated
  340. regularly.  This means that you need not worry about
  341. saving your data, however the EXIT option should be
  342. considered the only safe way to leave the Advent
  343. environment as it ensures that all your data is saved,
  344. and then does some extra tidying up.  Indeed, Advent
  345. actively discourages you from exiting Advent other than
  346. through this option.  When choosing the exit option you
  347. are also given the opportunity to load a different
  348. adventure database into Advent.
  349.  
  350.  
  351. THE ADVENT TEXT EDITOR.
  352.  
  353. The Advent database editor is designed for the easy entry
  354. of information, much of which will be in the form of
  355. text, for example, location descriptions, messages, and
  356. descriptions of objects.
  357.  
  358. The text editor mode is used to enter text into Advent,
  359. or to make changes to text that has been entered
  360. previously.
  361. The text editor screen appears automatically when text
  362. input is required, for example, to enter a message or
  363. location description.  It is also used in the event,
  364. status and movement table editor modes to insert or edit
  365. entries.
  366.  
  367. The text editor is basic, but sufficient.  Text is
  368. entered simply by typing it at the keyboard, and it is
  369. inserted into your text at the current cursor position.
  370.  
  371. To make changes to your text, use the cursor keys to move
  372. the cursor to any position within the text.  You can also
  373. use the HOME and END keys to move straight to the
  374. beginning or end of the current line, that is, column one
  375. or column eighty.  Typed characters always appear at the
  376. current cursor position.
  377.  
  378. Text can be deleted using either the DELETE key, which
  379. deletes the character under the cursor, or with BACKSPACE
  380. which deletes the character immediately behind the
  381. cursor.
  382.  
  383. To overwrite existing text press the INSERT key once, the
  384. area at the bottom of the screen now shows OVERTYPE ON.
  385. Any text you type will overwrite what already exists.
  386. Insert can be turned back on again by pressing INSERT
  387. once again.  Note that overtype is set to OFF every time
  388. you enter the text editor.
  389.  
  390. The Advent text editor is not a word processor, and has
  391. to be used slightly differently.  You will maybe find it
  392. peculiar at first, but it soon becomes easier:
  393.  
  394. It is possible for a word to overlap two lines on the
  395. screen, i.e. text is not 'word-wrapped' and the text must
  396. be padded with spaces or a RETURN to prevent this.
  397.  
  398. Pressing the RETURN key starts a new line by filling the
  399. current one with spaces.  Because of this, some care
  400. needs to be taken when working with text.  Entering text
  401. behind a RETURN will cause the whole text to shuffle
  402. forwards, and the RETURN may cease to line up with the
  403. edge of the screen.  For this reason it is recommended
  404. that you set insert to OFF when working on text that
  405. contains many RETURNs.
  406.  
  407. When using RETURN in your texts, the two delete functions
  408. Shift-F9 and Shift-F10 may prove useful.  These functions
  409. delete all characters between the cursor and the
  410. beginning or end of the line respectively.  The function
  411. Alt-F7 is used to completely clear the text.  These key
  412. combinations are intentionally non-intuitive to help
  413. prevent accidental erasure of your work.  If the current
  414. editor mode permits their use, they will be displayed at
  415. the bottom of the screen to jog your memory.
  416.  
  417. When you have finished in the text editor mode, press the
  418. ESC key to return to the menu.
  419.  
  420. NOTE:  Character graphics can be entered by holding down
  421. the ALT key and typing the extended ASCII code number of
  422. the character required on the NUMERIC KEYPAD.
  423. __________________________________________________________
  424. __________________________________________________________
  425.  
  426.  
  427. ADVENT USER MANUAL - PART 2.
  428.  
  429. YOUR FIRST ADVENT ADVENTURE.
  430.  
  431. An Advent game is essentially a series of instructions
  432. which define the way the interpreter behaves during a
  433. game.  You simply tell Advent what the instructions are.
  434. This may sound frighteningly similar to programming, and
  435. indeed, an Advent adventure game is a computer program of
  436. a sort.  However, the language used by Advent is designed
  437. to be easy to use, even for non-programmers.  Most people
  438. are able to pick it up very quickly.
  439.  
  440. The Advent `language' is very versatile, with over forty
  441. recognised words.  That may sound like a lot, but really
  442. there are only a few essentials.  The rest however are
  443. all useful and contribute to the versatility of the
  444. system.  The easiest way to learn the essentials is
  445. probably to be guided through the creation of a game.
  446. So...
  447.  
  448. Let's write a game!  A first attempt should be a small,
  449. fairly simple game, however, by writing even a simple
  450. game you can become familiar with the Advent system, and
  451. will soon be able to tackle larger tasks.
  452.  
  453. Let's say that the objective of the game is wander around
  454. a small town, to find a heap of treasure, and store it
  455. safely under your bed at home.  Boring, but suitably
  456. simple!
  457.  
  458. This part of the manual guides you through the creation
  459. of such a game, introducing many of Advent's features,
  460. and making a number of important points.  However eager
  461. you are to start work on your own game, please do not
  462. skip through this section.  It has been designed as
  463. essential reading, and covers points that are not
  464. mentioned in the second part of the manual.
  465.  
  466. To begin with, we need to create a new game.  We do this
  467. by entering a filename for the game at the prompt on the
  468. initial screen which appears when Advent is first loaded.
  469.  
  470. Load up the ADVENT environment and type the name of the
  471. adventure we are about to create at the prompt, then
  472. press RETURN.  If you like, call it MYGAME.  If you wish
  473. to create the game on a specific disk drive, or in a
  474. specific directory, then you should include the drive and
  475. path in the filename, using the standard DOS syntax.
  476.  
  477. If there is a problem at any stage Advent will display an
  478. Error Box.  This tells you something about the problem,
  479. and may suggest a way to rectify it.
  480.  
  481. A possible problem at this stage may be that there is no
  482. space on a disk, or the drive door is still open.
  483. Hopefully all will go smoothly, and you will have to wait
  484. for a moment while Advent builds an Index File.
  485.  
  486. When the initial files have been successfully created the
  487. main menu screen appears.
  488.  
  489. We are ready to create the game:  For this example we
  490. will be entering data straight into the computer,
  491. however, speaking from experience, I suggest that you
  492. plan your adventures, especially large projects,
  493. extensively on paper before you start typing!
  494.  
  495.  
  496. LOCATIONS AND THE VOCABULARY.
  497.  
  498. The first thing to do is to create the locations which
  499. the adventurer can visit.  Highlight LOCATION TEXT from
  500. the main menu and press return.
  501.  
  502. The Location text menu gives you the option to INSERT,
  503. AMEND, DISPLAY or PRINT the locations.  The only sensible
  504. thing to do first is to insert, as the other options
  505. require some existing entries.  Highlight INSERT LOCATION
  506. TEXT and press return.
  507.  
  508. You are presented with the text editor screen, which has
  509. been described previously in this manual.  Advent
  510. automatically chooses the next free location number for
  511. the entry.  This is number one.  Next time you use insert
  512. a text it will be entry number two, and so on.
  513.  
  514. Type in this location description:
  515.  
  516.  
  517. My First Adventure.
  518. Are you ready?
  519.  
  520.  
  521. Then press ESC when you are finished.  You are returned
  522. to the location text menu.  Now, although this may not
  523. look like much of a location, it serves a definite
  524. purpose which will be revealed shortly...
  525.  
  526. Now select display location texts from the menu.  You are
  527. prompted for the number of the first text to be
  528. displayed, type 1 and press return.  The entry is now
  529. displayed.  Hit a key to return to the menu when you are
  530. ready.
  531.  
  532. Now insert the rest of the entries, just like you did for
  533. the first, by selecting INSERT and pressing ESC when
  534. finished.  The entries are:
  535.  
  536.  
  537. Location two.
  538.  
  539. You are in the downstairs room of your house.  There is a
  540. door to the south and stairs leading up.
  541.  
  542.  
  543. Location three.
  544.  
  545. You are at a crossroads.
  546. Your little house lies to the north, and Mr. Piglet's
  547. grocery shop is to the east
  548. The road extends further to the south, and there is a
  549. church with a big tower, to the west.
  550.  
  551.  
  552. Location four.
  553.  
  554. You are on a road, which is black with a white stripe
  555. running intermittently up the centre.
  556. You can see a junction to the north and a hospital to the
  557. west.
  558. There is a large sign here which reads "SALE, 10% off all
  559. kitchens."
  560. An arrow on the sign points south.
  561.  
  562.  
  563. Location five.
  564.  
  565. You are in a prefabricated kitchen warehouse.  The
  566. kitchens in the warehouse are all prefabricated, but it
  567. would be equally true to say that it is the warehouse
  568. itself that is of a prefabricated nature.
  569. There is, surprisingly perhaps, a sale on, and it must
  570. end Saturday.
  571. The doors are to the north.
  572.  
  573.  
  574. Location six.
  575.  
  576. You are inside Mr. Piglet's grocery emporium.  All manner
  577. of groceries can be purchased here.
  578. The door is to the west.
  579.  
  580.  
  581. Location seven.
  582.  
  583. You are inside the church, which is small and grubby,
  584. with a particularly high ceiling.  The door is to the
  585. east, but the door really is INCREDIBLY HIGH.
  586.  
  587. Location eight.
  588.  
  589.  
  590. You are in the tower of the church, it is cold and
  591. draughty and full of pigeons.
  592.  
  593.  
  594. Location nine.
  595.  
  596. You are in a hospital.  A large nurse is stomping around
  597. with an enormous syringe.  To the east you can see the
  598. street.
  599.  
  600.  
  601. Location ten.
  602.  
  603. Inside the fish.  Gastric juices have already digested
  604. your shoes, and it doesn't look like your socks will last
  605. much longer.
  606.  
  607.  
  608. Ok, so you've got ten location descriptions, but 'Inside
  609. the fish' is just silly!  Select AMEND LOCATION TEXT and
  610. enter the location number for `Inside the fish.'  If you
  611. had forgotten which number it was, you could have checked
  612. using the DISPLAY option, which would have told you that
  613. it's number ten.
  614. Type 10 and press return.
  615. The entry appears on the screen where you can edit it.
  616. Erase the whole entry with ALT-F7 and replace it with:
  617.  
  618.  
  619. You are in your bedroom, but this morning you do not have
  620. a hangover.
  621. It's going to be a beautiful day.
  622.  
  623.  
  624. Press ESC again to finish, and then select DISPLAY to see
  625. all the entries, starting with the first.  Check the
  626. spelling, and AMEND any that need correction.
  627.  
  628. If you have a parallel printer attached you can make a
  629. printout of these texts.  Select PRINT OUT from the menu
  630. to send the data to the printer.  Make sure it is 'ON
  631. LINE' before you start.
  632.  
  633. Then select EXIT TO MAIN MENU from the location text
  634. menu, the data is saved, and the disk indexes are updated
  635. before the main menu appears.
  636.  
  637. So, the locations for the adventure have been defined,
  638. but there are not yet any links between them.  For
  639. example, if the user is at location number six, and types
  640. WEST, we want them to end up in location number three.
  641. The computer doesn't know this, so we need to tell it.
  642. This information will be stored in the MOVEMENT TABLE.
  643.  
  644. However, before we edit the MOVEMENT TABLE, we must
  645. define the words that the user needs for movement.  So
  646. first we select VOCABULARY from the main menu.
  647.  
  648. The vocabulary menu appears.  Selecting DISPLAY WORDS
  649. will show a blank display area, indicating that no words
  650. have yet been entered.  Press a key to return to the
  651. vocabulary menu.
  652.  
  653. Now we need to enter some words.  We will use UP, DOWN,
  654. NORTH, SOUTH, EAST and WEST to describe movements.
  655. To insert a new word into the vocabulary select INSERT
  656. from the vocabulary menu.  You are prompted to enter the
  657. word, so type UP and press return.
  658. The prompt window then displays a prompt asking for a
  659. word value for UP.  The word value is a number between
  660. one and two thousand which is vital for internal use by
  661. ADVENT, however it also allows us to define synonyms, or
  662. words that have the same meaning as each other.  Enter
  663. the word value of one for UP.  A word value less than
  664. twenty-one is used to identify the word as a word
  665. associated with movements.  The interpreter needs to know
  666. this in order to display appropriate messages during the
  667. game.
  668.  
  669. Repeat this procedure for the following words, giving
  670. them the word values shown.
  671.  
  672. Word      Word Value
  673.  
  674. DOWN      2.
  675. NORTH     3.
  676. SOUTH     4.
  677. EAST      5.
  678. WEST      6.
  679.  
  680. Some players will like to use abbreviations for
  681. directions, typing U to go up, or N to go north.  This is
  682. where synonyms can be used.  INSERT the word U, and give
  683. it the word value one, the same as UP.  Now, these words
  684. have exactly the same meaning to the computer.
  685.  
  686. Any use of the abbreviation U in either the database
  687. editor or the game interpreter will now be translated
  688. automatically into the word UP.  The first word entered
  689. into the vocabulary with a particular word number is the
  690. word into which any other word with the same number will
  691. be translated by the database editor.
  692.  
  693. Now insert abbreviations as follows:
  694.  
  695. Word      Word Value
  696.  
  697. D         2.
  698. N         3.
  699. S         4.
  700. E         5.
  701. W         6.
  702.  
  703. Select DISPLAY WORDS from the vocabulary menu to view the
  704. vocabulary.  If you have made a mistake you can use
  705. DELETE WORD to remove the offending word from the
  706. vocabulary.  The computer asks you to confirm that the
  707. word is to be deleted.  This is because deleting a word
  708. can have effects elsewhere in the database.  If the word
  709. has synonyms, you are safe, but if a word is deleted that
  710. doesn't have a synonym then any Event, Status, Movement
  711. or Object Word entry where that word is used will be
  712. removed from the database.
  713.  
  714. Use DISPLAY WORDS again to ensure that the vocabulary is
  715. as intended, and use EXIT TO MAIN MENU to when you are
  716. happy.
  717.  
  718.  
  719. THE MOVEMENT TABLE.
  720.  
  721. Having defined the movement words in the vocabulary, we
  722. can create the movement table.
  723. We are going to create a movement table to link the
  724. locations as shown in this map:
  725.  
  726.  
  727.                     +---------------+
  728.                     | Bedroom       | 
  729.                     |               |    
  730.                     |               |
  731.                     | 10    U       |
  732.                     +-------|-------+
  733. +---------------+   +-------|-------+
  734. | The church    |   | Downstairs    |
  735. | tower         |   |               |
  736. |               |   |               |
  737. | 8     U       |   | 2             |
  738. +-------|-------+   +-------|-------+
  739. +-------|-------+   +-------|-------+   +---------------+
  740. | A church      |   | A crossroads  |   | Mr Piglet's   |
  741. |               |   |               |   | shop          |
  742. |               |---|               |---|               |
  743. | 7             |   | 3             |   | 6             |
  744. +---------------+   +-------|-------+   +---------------+
  745. +---------------+   +-------|-------+
  746. | A hospital    |   | A road        |
  747. |               |   |               |              N
  748. |               |---|               |           /|\
  749. | 9             |   | 4             |            |
  750. +---------------+   +-------|-------+      W     |    E
  751.                     +-------|-------+      ------+-----
  752.                     | A warehouse   |            |
  753.                     |               |            |
  754.                     |               |            | S
  755.                     | 5             |
  756.                     +---------------+
  757.  
  758.  
  759. Select MOVEMENT TABLE from the main menu.  Notice that
  760. the movement table menu has no option for inserting
  761. entries.  This is because an entry is created
  762. automatically for every location defined in the database.
  763. The entries start out empty, so they must be AMENDED in
  764. order to change them.
  765.  
  766. Select AMEND from the menu and enter the number three.
  767. This means we are editing the movement data which will
  768. apply when the player is at location three (at the
  769. crossroads).
  770.  
  771. Enter the following:
  772.  
  773.  
  774. NORTH 2 SOUTH 4 EAST 6 WEST 7
  775.  
  776.  
  777. and press ESC to finish.
  778.  
  779. If you have made a mistake you will be warned of it, and
  780. the cursor will be positioned close to it, to allow you
  781. to correct it.  If this happens, check that your entry
  782. matches exactly the one above.
  783.  
  784. So, you've got this entry, but what does it mean?
  785.  
  786. The words, as you have probably realised, are words from
  787. the vocabulary.  The numbers, less obviously, are
  788. location numbers.  The movement table works by comparing
  789. the movement table entry for the current location, with
  790. the users command.  For example, if when at location
  791. three, the user types NORTH, the interpreter looks for
  792. the word NORTH in the movement table entry for location
  793. three.  It finds it, and looks to see what number
  794. follows.  It will find the number two.  The player is
  795. then moved to location number two.  Had they typed EAST
  796. they would move to location number six and so on.
  797.  
  798. The movement table must be completed like this for each
  799. location in the game.  Location four is the second most
  800. complicated:  If at location four the player would arrive
  801. at location three by typing NORTH or at location five by
  802. typing SOUTH.  Typing WEST would take them to location
  803. nine.  Try to work out the correct movement table entry
  804. for yourself and enter it.
  805.  
  806. You should have entered for location four:
  807.  
  808.  
  809. NORTH 3 SOUTH 5 WEST 9
  810.  
  811.  
  812. Correct this using the AMEND function if necessary, then
  813. enter the following entries for the other locations.
  814. Remember that you can use the single letter abbreviations
  815. if you wish, they will be translated into full words by
  816. the editor.
  817.  
  818.  
  819. Location 1:         NORTH 10
  820.  
  821. Location 2:         UP 10 SOUTH 3
  822.  
  823. Location 5:         NORTH 4
  824.  
  825. Location 6:         WEST 3
  826.  
  827. Location 7:         EAST 3 UP 8
  828.  
  829. Location 8:         DOWN 7
  830.  
  831. Location 9:         EAST 4
  832.  
  833. Location 10:        DOWN 2
  834.  
  835.  
  836. DISPLAY the entries to check them, and correct any
  837. mistakes with AMEND.
  838.  
  839. Notice that each doorway requires a separate statement
  840. for each direction that the player may move through it.
  841. For example the location seven entry must describe the
  842. movement EAST to location 3, even though the same door
  843. has been identified by WEST 7 in the entry for location
  844. 3.  This `feature' is important as it allows the creation
  845. of one way doors, doors that are locked, and even
  846. fiendish mazes where going EAST then WEST need not return
  847. the player to the same place as where they started!
  848.  
  849. Use EXIT to return to the main menu.
  850.  
  851.  
  852. TESTING THE ADVENTURE.
  853.  
  854. We are finally able to test our adventure.  It is far
  855. from complete, but we ought to be able to move around
  856. between the various locations.
  857.  
  858. Choose TEST ADVENTURE from the main menu.  You may have
  859. to wait for a moment whilst Advent loads the interpreter
  860. program...
  861.  
  862. The interpreter begins by asking you if you want to use
  863. DIAGNOSTICS.  This facility enables us to view the states
  864. of a number of flags as we play the game.  In this case,
  865. the feature will be of little use, so reply with N for
  866. No.  We will however use diagnostics a little later when
  867. we get more adventurous!
  868.  
  869. Note next the two commands which are added to the
  870. vocabulary when we are testing a game.  They are prefixed
  871. with asterisks to minimise the risk of clashing with
  872. words in your game.  They should be self explanatory.
  873.  
  874. Hit a key to begin testing.
  875.  
  876. Let's explain about location number one:  In this case it
  877. doesn't look much like a location description, because it
  878. isn't:  The first important point is that the game always
  879. begins by putting the player at location one.  The second
  880. is that, later we are going to make it dark at the beginning
  881. of the game, and, because of the way the interpreter works,
  882. we can't make it dark immediately that the player lands in
  883. location one at the start of the game.  The simple solution
  884. is to make location one a dummy first location, then make
  885. it dark, and then move them to the first 'real location'
  886. of the game.  Until then we can use NORTH to move to the
  887. first real location, the bedroom.  You should now
  888. experiment, try moving in all directions from all
  889. locations, and check that the results correspond to the map.
  890.  
  891. When you are finished type *EXIT to finish.  You will be
  892. returned to the editor main menu.
  893.  
  894. If you found any problems with the movements, you should
  895. now check the movement table entries and make the
  896. necessary corrections.
  897.  
  898.  
  899. DARKNESS AND THE STATUS TABLE.
  900.  
  901. Now, what was that I said about making it dark at the
  902. beginning of the game?  How do we do that?
  903.  
  904. We need to place an entry in the status table:  Remember
  905. that the status table stores a set of entries each of
  906. which contains conditions, and actions.  The table is
  907. checked just before every player input, and if the
  908. conditions in ANY entry are satisfied, the associated
  909. commands will be executed.
  910.  
  911. Choose status table from the main menu, and choose to
  912. insert an entry.  The editor asks you to insert two
  913. 'status words'.
  914. Now, the status words serve simply to identify the entry,
  915. (and can have an effect on the order of storage in the
  916. database) so you can choose any two words from the
  917. vocabulary which you feel describe the purpose of the
  918. entry you are about to make.  Alternatively, either of
  919. these words may be wildcards, the asterisk character '*'.
  920. In this game there will be very few status table entries,
  921. and we do not have suitable vocabulary words to make a
  922. description, so we simply enter two asterisks, separated
  923. by a space.
  924.  
  925.  
  926. * *
  927.  
  928.  
  929. The asterisk is used here, and more importantly in the
  930. event table, when we want to tell Advent that we REALLY
  931. DON'T MIND what word is in this position.  This should
  932. become clear later.
  933.  
  934. We are then moved to the editor to make the entry.
  935. Notice that the status words (asterisks in this case) are
  936. at the beginning of the entry.  Do not delete them, as
  937. they are important.
  938.  
  939. What do we want this entry to do?
  940.  
  941. If the player is at location one, and it is the beginning
  942. of the game, we must make it dark, then we will wait for
  943. a key press, and move the player onto the location where
  944. they start the game.
  945.  
  946. We could write this:
  947.  
  948. IF (at location 1) and (start of game)
  949. THEN (make it dark), (wait for a key press),
  950. (move to location 10) and (describe the location)
  951.  
  952. Many of these conditions and actions translate directly
  953. into Advent commands, others are less simple.  The
  954. components of the entry are described below.
  955.  
  956. (at location 1) is tested with the condition AT 1, which
  957. is satisfied if the player is at location 1.
  958.  
  959. (start of game) is tested by checking that the turns
  960. count is set to zero.  The turns counter is stored in
  961. flags 55 and 56 (see Appendix 1), so we test that
  962. both are zero with EQ 55 0 EQ 56 0
  963.  
  964. (make it dark) is performed by setting the value of flag
  965. number one.  Any non zero value will do, but Advent has a
  966. command SET, which sets the value to the largest
  967. possible, 32767.  We use SET 1
  968.  
  969. (wait for a key press) is handled by the command ANYKEY.
  970. The interpreter displays the prompt PRESS ANY KEY TO
  971. CONTINUE, at the bottom of the screen, and waits for a
  972. key press.
  973.  
  974. (move to location 10) is handled by the command GOTO
  975. which moves the player to the specified location number.
  976. We use GOTO 10.
  977.  
  978. (describe the location) translates directly to DESC.
  979. Thus the entry becomes
  980.  
  981.  
  982. * * AT 1 EQ 55 0 EQ 56 0 SET 1 ANYKEY GOTO 10 DESC
  983.  
  984.  
  985. Enter this, then press ESC to finish editing.  Note that
  986. you do not need to add the asterisks again.  If the
  987. editor detects a syntax mistake, the cursor will be
  988. positioned close to the error for you to correct it.
  989. Press ESC again when all corrections have been made.
  990.  
  991. One further change needs to be made.  The movement table
  992. entry for location one contains 'NORTH 10', which is now
  993. redundant.  Amend the entry to remove this, making the
  994. entry blank.
  995.  
  996.  
  997. THE EVENT TABLE.
  998.  
  999. So it will be dark at the beginning of the game, but the
  1000. actual situation that we want to create is as follows:
  1001.  
  1002. a)  It is dark at the start of the game.
  1003. b)  The player cannot go down the stairs when it is dark.
  1004. c)  The player is able to turn the light on.
  1005.  
  1006.  
  1007. The movement table contains an entry 'DOWN 2' at location
  1008. one.  This means that the player can always go DOWN, to
  1009. location two.  This is not what we want, as we want to be
  1010. able to stop them doing this, if it is dark.
  1011.  
  1012. I am about to demonstrate then, how we can handle special
  1013. movement situations outside the movement table by using
  1014. the EVENT TABLE, and also the use of the event table to
  1015. turn a light on.
  1016.  
  1017. First we remove the movement table entry for location
  1018. ten.  Amend this so that the entry is blank.
  1019.  
  1020. Then we add some words to the vocabulary:  These are the
  1021. new words that will be needed for the darkness/going
  1022. downstairs part of the game.
  1023.  
  1024. Insert the following words into the vocabulary:
  1025.  
  1026.  
  1027. Word      Word value
  1028.  
  1029. ON        109
  1030. LIGHT     110
  1031. LAMP      110
  1032.  
  1033.  
  1034. Notice that LIGHT and LAMP are synonyms.  They share
  1035. exactly the same meaning, as far as Advent is concerned.
  1036. We must also define some messages that are required.
  1037. Insert the following messages:
  1038.  
  1039.  
  1040. Message 1.
  1041. You switch on the light, you can see much more clearly
  1042. now.
  1043.  
  1044. Message 2.
  1045. You shuffle around in the dark, but cannot find the
  1046. stairs.
  1047.  
  1048.  
  1049. We can now add an entry to the EVENT TABLE.  This is very
  1050. similar to the status table that we used earlier, but it
  1051. is dependant on the players input.  I will demonstrate:
  1052.  
  1053. From the main menu, choose EVENT TABLE.
  1054.  
  1055. Select INSERT EVENT TABLE ENTRY.
  1056.  
  1057. For the event words, enter 'DOWN *' (Two words separated
  1058. by a space) and press return.
  1059. You are now in the text editor.  Type in the entry so
  1060. that you have the following:
  1061.  
  1062.  
  1063. DOWN * AT 10 ZERO 1 GOTO 2 DESC
  1064.  
  1065.  
  1066. and press ESC to finish.
  1067.  
  1068. Again, if the entry contains a mistake or syntax error,
  1069. you will be prompted to correct it before you can quit
  1070. the text editor.
  1071. Using the semi-coded notation introduced earlier, the way
  1072. the entry works can be seen:
  1073.  
  1074. IF (players first word is DOWN) BUT (we don't care what
  1075. the second word is) AND (the player is at location ten)
  1076. AND (it is NOT dark)
  1077.  
  1078. THEN (move to location 2) AND (describe the location)
  1079.  
  1080. We have thus covered the situation where the player tries
  1081. to go down, and succeeds, because it is not dark.  We now
  1082. INSERT a similar entry for the situation when it IS dark,
  1083. and the move is prohibited.
  1084. INSERT the following entry into the event table:
  1085.  
  1086.  
  1087. Event words: DOWN *  (again)
  1088.  
  1089. Complete entry:
  1090. DOWN * AT 10 NOTZERO 1 MESSAGE 2 DONE
  1091.  
  1092.  
  1093. The entry works as follows:
  1094.  
  1095. IF (players first word is DOWN) AND (at location ten) AND
  1096. (it is dark)
  1097.  
  1098. THEN (display message number two 'You shuffle around...')
  1099.  
  1100. We now have an entry to handle both situations that may
  1101. arise:  If it is dark, the player is told that they can't
  1102. go downstairs, and if it is light they are allowed to go.
  1103. Easy eh?
  1104.  
  1105. You will notice that we now have two event table entries
  1106. that share the same event words, DOWN *.  This is not a
  1107. problem, as Advent can handle any number of entries like
  1108. this.  You will notice however that the process of
  1109. AMENDING an entry changes somewhat.  If you try to AMEND
  1110. DOWN *, you will be able to edit the first DOWN * entry
  1111. in the table, pressing ESC will take you to the second,
  1112. and if there was a third, pressing ESC again would take
  1113. you to that one.  In this case, pressing ESC the second
  1114. time will return you to the menu.
  1115.  
  1116. What remains now is to allow the player to turn on the
  1117. light.  We have words and messages ready, and we assume
  1118. that there is a light in the room so we needn't add it as
  1119. an object.  This is done with a further entry to the
  1120. EVENT TABLE:
  1121.  
  1122. Enter the following:
  1123.  
  1124. Event words: ON LIGHT
  1125.  
  1126. Complete entry:
  1127. ON LIGHT NOTZERO 1 CLEAR 1 MESSAGE 1
  1128.  
  1129. Which could be read as:
  1130.  
  1131. IF (the player types ON LIGHT) and (it is dark, i.e. flag
  1132. one is non zero)
  1133.  
  1134. THEN (clear the value in flag one, i.e. make it light)
  1135. AND (display message number one)
  1136.  
  1137. Notice that we do not check that the player is at
  1138. location ten.  This is not necessary because the player
  1139. cannot leave location ten while it is still dark.
  1140.  
  1141. I should now mention something about the way that Advent
  1142. handles player inputs.
  1143.  
  1144. If you were playing a game, it is unlikely that you would
  1145. type ON LIGHT to turn on a light.  Possible inputs
  1146. include:
  1147.  
  1148. TURN ON THE LIGHT
  1149. TURN ON LIGHT
  1150. SWITCH ON THE LIGHT
  1151. SWITCH ON THE $*!@ING LIGHT etc...
  1152.  
  1153. But the event table would get very full if we had to
  1154. anticipate all these entries in advance.  Fortunately,
  1155. our ON LIGHT entry handles all of the above for us.  What
  1156. actually happens is that the interpreter searches the
  1157. players input string for words that it knows, i.e. words
  1158. that are stored in the vocabulary.  It then attempts to
  1159. match the first two recognised words with the event words
  1160. in the event table.
  1161.  
  1162. Provided that the words TURN and THE are not in the
  1163. vocabulary, Advent will pick out the words ON and LIGHT,
  1164. and these will satisfy the event entry ON LIGHT.
  1165. Similarly, assuming that SWITCH is not in the vocabulary,
  1166. SWITCH ON THE LIGHT will be reduced to ON LIGHT also.
  1167.  
  1168. There is obviously the possibility that the word SWITCH
  1169. might be needed elsewhere, and has to be stored in the
  1170. vocabulary.  In situations like this, and there will be a
  1171. few in a big project, you must use your experience to
  1172. choose vocabulary and event words that do not clash.
  1173. Advent also provides the HASH STRING method, which can be
  1174. useful in some of these situations.  But really, what's
  1175. the fun in Adventuring if the machine doesn't reply 'I
  1176. don't understand' a few times?
  1177.  
  1178. What if the player types TURN THE LIGHT ON ?
  1179.  
  1180. This, and constructs like it would not be picked up by
  1181. Advent, as the words LIGHT and ON are in the wrong order
  1182. to satisfy the event words for ON LIGHT.  We will add a
  1183. further entry:
  1184.  
  1185. Event words: LIGHT ON
  1186.  
  1187. Complete Entry:
  1188. LIGHT ON NOTZERO 1 CLEAR 1 MESSAGE 1
  1189.  
  1190. You will notice that the conditions and actions are
  1191. identical to those used in ON LIGHT.  You should now be
  1192. fairly happy that with only two entries we have covered
  1193. most of the ways that a player might try to turn on the
  1194. lights.
  1195.  
  1196. If you like, and I'm sure you will, you can test the
  1197. adventure again.  This time ask for diagnostics by
  1198. replying Y for Yes to the question.  You are then asked
  1199. which flags you want to watch.  Enter 'L' to have Advent
  1200. monitor the current location number, and watch it appear
  1201. in the DIAGNOSTICS WINDOW.  We are also making use of
  1202. flag one, the darkness flag, so select that by entering
  1203. the number '1'.  Finally enter 'X' to exit the diagnostics
  1204. setup screen.  Hit another key, and we are ready to start
  1205. playing!  Remember to watch these flags whilst you are
  1206. playing.  You should notice flag 1 change as darkness is
  1207. 'turned on' and 'turned off'
  1208.  
  1209. Notice also the diagnostics window at the bottom of the
  1210. screen.  This is, of course, not available for display in
  1211. the completed game.
  1212.  
  1213. This time, we do not get an input prompt, but are asked
  1214. to 'PRESS ANY KEY TO CONTINUE' at the bottom of the
  1215. screen.  This is our ANYKEY command in action.  When a
  1216. key gets pressed you should be moved to the first
  1217. location, where it is dark.   Try it, and verify that
  1218. this is the case.
  1219.  
  1220. Try to go downstairs by typing 'DOWN'  The message should
  1221. appear to tell us that this is not possible in the dark.
  1222.  
  1223. Try to 'TURN ON THE LIGHT' or any other similar phrase,
  1224. and verify that it works.  Now, typing 'DOWN' should take
  1225. us downstairs, from where we are able to explore the rest
  1226. of the locations.
  1227.  
  1228. Type *EXIT when you are finished.  This returns you to
  1229. the main menu.
  1230.  
  1231.  
  1232. SOME MORE BITS AND PIECES.
  1233.  
  1234. We are now ready to add more features to the game:  first
  1235. of all, a few commands to make life easier for the user.
  1236.  
  1237. We are going to add INVENTORY and DESCRIBE and QUIT
  1238. commands.  The first gives the player an inventory, or
  1239. list of objects carried, and the second will be used to
  1240. redisplay the current location text.  Quit lets the
  1241. player stop playing before they have completed the game,
  1242. and we will make it tell them how many turns they have
  1243. used.
  1244.  
  1245. First we add the necessary words to the vocabulary:
  1246.  
  1247. Word      Word Value
  1248.  
  1249. INVENTORY 107       (this will be shortened to INVENTOR)
  1250. I         107
  1251. DESCRIBE  108
  1252. DESC      108
  1253. LOOK      108
  1254. QUIT      112
  1255.  
  1256.  
  1257. And then we add these very simple entries to the event
  1258. table:
  1259.  
  1260. To handle the location redescriptions,
  1261.  
  1262. Event words: DESC *
  1263.  
  1264. Complete entry:
  1265. DESC * DESC
  1266.  
  1267.  
  1268. To handle the inventory display,
  1269.  
  1270. Event words: INVENTORY *
  1271.  
  1272. Complete entry:
  1273. INVENTOR * INVEN DONE
  1274.  
  1275. And to handle the Quit facility,
  1276.  
  1277. Event words: QUIT *
  1278.  
  1279. Complete entry:
  1280. QUIT * QUIT TURNS END
  1281.  
  1282. The action INVEN is provided by Advent to display the
  1283. inventory list
  1284. You could now test the game to check that these new
  1285. commands work.
  1286.  
  1287.  
  1288. OBJECTS.
  1289.  
  1290. We are now ready to add objects to our adventure.  An
  1291. object can be any item that appears in the game.  Often
  1292. they can be manipulated by the player, picked up, put
  1293. down etc.  If there is a need for an item that can be
  1294. moved, made to disappear, changed into something else,
  1295. etc, etc... then you should make it an object.
  1296.  
  1297. We can define the objects for our game using the OBJECT
  1298. TEXT menu.  Select this now, and use the INSERT OBJECT
  1299. TEXT option to enter the following object descriptions,
  1300. just as you would a message or location text.
  1301.  
  1302.  
  1303. Object 1.
  1304. A pile of shiny jewels (they must be worth quite a lot of
  1305. money)
  1306.  
  1307. Object 2.
  1308. A tin can, with no label.  Whatever could be inside?
  1309.  
  1310. Object 3.
  1311. An open tin can.
  1312.  
  1313. Object 4.
  1314. A ladder.
  1315.  
  1316. Object 5.
  1317. A key. (A label on the ring reads 'Tower')
  1318.  
  1319. Object 6.
  1320. A tin opener.
  1321.  
  1322.  
  1323. Having defined the texts to describe the six objects in
  1324. the game, we must define further properties, such as the
  1325. locations at which they appear, and the words used to
  1326. refer to them.
  1327.  
  1328. The location at which an object first appears in the game
  1329. is set using the OBJECT START LOCATION menu.  A bit like
  1330. for items in the movement table, an object start location
  1331. entry is maintained automatically for every object that
  1332. you have defined.  You use the AMEND option to change an
  1333. entry.
  1334.  
  1335. You are prompted to enter the object number for the
  1336. object whose start location you wish to change, and
  1337. provided that you enter a valid number, the first few
  1338. characters of the object text are displayed.  You must
  1339. then enter the start location which must be either a
  1340. valid location number, or one of the letters 'C' 'W' or
  1341. 'N' which are used if you want an object to be initially
  1342. 'Carried', 'Worn' or 'Not created'.
  1343.  
  1344. You should now enter the start locations for our objects
  1345. as follows:
  1346.  
  1347. Object 1       at location 8
  1348. Object 2       at location 6
  1349. Object 3       Not created (enter 'N')
  1350. Object 4       at location 5
  1351. Object 5       Not created
  1352. Object 6       at location 4
  1353.  
  1354.  
  1355. Then exit to the main menu.
  1356.  
  1357. If you were to test the adventure now, you would find the
  1358. objects at their respective start locations, but would be
  1359. unable to manipulate them, as we have not defined the
  1360. ways in which this can be done.
  1361.  
  1362. There are actions GET and DROP which can be used in the
  1363. event and status tables for the manipulation of
  1364. individual objects.  It is also possible to CREATE and
  1365. DESTROY objects, they are not actually created and
  1366. destroyed from/to nothing, rather, objects which have
  1367. been defined in the database can be brought into
  1368. existence (and removed from it) as far as the player of
  1369. the game is concerned.
  1370.  
  1371. So, we could add an event table entry for each object
  1372. along the lines of:
  1373.  
  1374. GET TIN GET 2 OK
  1375. GET JEWELS GET 1 OK
  1376. DROP TIN DROP 2 OK
  1377. DROP JEWELS DROP 1 OK
  1378.  
  1379. When you consider that Advent can cope with upto a
  1380. thousand objects, each of which can be taken and dropped,
  1381. and some of which can be worn and removed, this would
  1382. more than fill the three thousand event entry spaces
  1383. available.  You are probably thinking that there must be
  1384. an easier way.  So there is:
  1385.  
  1386. The OBJECT WORD TABLE defines a single word from the
  1387. vocabulary to be associated with each object that you
  1388. wish to manipulate.  The objects can then be manipulated
  1389. using the AUTOG, AUTOD, AUTOW, and AUTOR actions in the
  1390. event table.
  1391.  
  1392. Most objects thus defined can be taken, carried, and
  1393. dropped by the player.  If the word value of the object
  1394. word is in the range 21 - 99, that defines an object that
  1395. can be worn and removed, as well as taken and dropped.
  1396. By leaving the object word blank you create an object
  1397. that is not affected by the AUTOx actions.  Such an
  1398. object can always be manipulated by the GET, DROP, CREATE
  1399. etc. actions mentioned earlier, as indeed can any object
  1400. that does have an object word, by using them directly in
  1401. the event or status tables.
  1402.  
  1403. Before defining our object word associations, we must
  1404. define the words themselves, so choose the VOCABULARY
  1405. option from the main menu, and insert the following
  1406. words:
  1407.  
  1408.  
  1409. Word      Word value
  1410.  
  1411. JEWELS    100
  1412. CAN       101
  1413. TIN       101
  1414. LADDER    102
  1415. KEY       103
  1416. OPENER    104
  1417. GET       105
  1418. TAKE      105
  1419. DROP      106
  1420. PUT       106
  1421.  
  1422.  
  1423. Obviously, the first six words in this list will refer to
  1424. objects whilst the last four are verbs that the player
  1425. can apply to them.
  1426.  
  1427. We can now define the object words, so select OBJECT
  1428. WORDS from the main menu.
  1429.  
  1430. Select DISPLAY OBJECT WORDS from the menu, and notice
  1431. that the object word for each of the objects, one to six,
  1432. is listed as NOT DEFINED.  Return to the OBJECT WORD menu
  1433. and select AMEND.  Like the screen for the object start
  1434. location, you are prompted for an object number, then the
  1435. beginning of the object text is displayed whilst you are
  1436. prompted for new object word.  Note that object words
  1437. must be a valid word from the vocabulary.
  1438.  
  1439. AMEND each object word entry as follows.
  1440.  
  1441. Object 1       JEWELS
  1442. Object 2       CAN
  1443. Object 3       CAN
  1444. Object 4       LADDER
  1445. Object 5       KEY
  1446. Object 6       OPENER
  1447.  
  1448.  
  1449. You will notice that the word CAN is used for two
  1450. objects.  This could cause problems if both cans were in
  1451. the same place at the same time, so that it would be
  1452. impossible to identify one unique object.  This is not a
  1453. problem in this case, as the two cans, one opened and one
  1454. closed, are mutually exclusive, i.e. the closed can will
  1455. be 'destroyed' as soon as it is 'opened' and the open can
  1456. will be 'created' in its place.
  1457.  
  1458. Now we must simply add the AUTOG and AUTOD entries in the
  1459. event table. That is done with the following entries:
  1460.  
  1461. Event words: GET *
  1462. Complete entry: GET * AUTOG OK
  1463.  
  1464. Event words: DROP *
  1465. Complete entry: DROP * AUTOD OK
  1466.  
  1467.  
  1468. The way that these work is that when the user tries to,
  1469. say, GET an object, the event table entry GET * will be
  1470. satisfied.  The AUTOG action then checks the next
  1471. recognised word in the players input, and if it matches
  1472. the object word for an object which is present at the
  1473. current location, that object will be picked up.  AUTOD,
  1474. AUTOW(ear) and AUTOR(emove) work in exactly identical
  1475. manners.
  1476.  
  1477.  
  1478. HASH STRINGS.
  1479.  
  1480. You should now test the adventure again.  You should find
  1481. that you can now pick up objects and put them down in
  1482. different places.  It's really that simple!
  1483.  
  1484. While testing, go to location four, the road outside the
  1485. hospital.  You should find the tin opener here, unless
  1486. you have already moved it, in which case, move to the
  1487. location where it is.
  1488.  
  1489. Attempting to pick up the tin opener is easy, if we know
  1490. the object word:  'GET OPENER' works fine.  But suppose a
  1491. player types 'GET THE TIN OPENER.'  The AUTOG action will
  1492. recognise the word TIN before it sees OPENER, and will
  1493. try to GET THE TIN.  Of course, this will produce an
  1494. incorrect response, such as 'It's not here' although the
  1495. player knows that the tin opener is in front of them.
  1496.  
  1497. One solution comes in the form of a HASH STRING.  Hash
  1498. strings are a powerful alternative to the EVENT WORDS
  1499. that we usually use to identify an event table entry.
  1500.  
  1501. A hash string is entered where you would normally enter
  1502. your pair of EVENT WORDS.  Instead you type a hash
  1503. character '#' followed by a number of words.  These words
  1504. need NOT be words from the vocabulary.
  1505.  
  1506. The interpreter checks to see if the players entry
  1507. matches any of the HASH STRINGS before testing the rest
  1508. of the event table.  (This is why hash entries are listed
  1509. at the beginning of the event table.)  When testing the
  1510. players input against a hash string, the interpreter
  1511. tests that each of the words in the hash string are
  1512. present in the players input, in the order that they
  1513. appear in the hash string.  They need not be consecutive.
  1514.  
  1515. Return to the editor and insert the following entry into the 
  1516. event table:
  1517.  
  1518. Event words: #GET TIN OPENER
  1519. Complete Entry:
  1520. #GET TIN OPENER GET 6 OK
  1521.  
  1522. For our tin opener problem, the hash string entry in the
  1523. event table:
  1524.  
  1525. #GET TIN OPENER
  1526.  
  1527. would be satisfied if the user entered
  1528.  
  1529. 'GET TIN OPENER', 'GET THE TIN OPENER', or 'GET THE GREEN
  1530. TIN OPENER'
  1531.  
  1532. It would not, however, be satisfied by:
  1533.  
  1534. 'TIN OPENER GET'
  1535.  
  1536. or any other phrase with the same words in a different
  1537. order.
  1538.  
  1539. We also need to add a similar entry for dropping the tin
  1540. opener, by adding an event table entry:
  1541.  
  1542. Event Words: #DROP TIN OPENER
  1543. Complete entry:
  1544. #DROP TIN OPENER DROP 6 OK
  1545.  
  1546.  
  1547. A WORD OF ADVICE WHEN USING HASH STRINGS.
  1548.  
  1549. The hash string facility is powerful, and in many
  1550. situations provides a simple way out of a tricky corner.
  1551. Without hash strings, the above example would have been
  1552. impossible without prompting the player for further
  1553. information.  Hash strings however, make hard work for
  1554. the interpreter:  Every hash string has to be tested,
  1555. every time the player takes a turn, and that can slow
  1556. things down.  Another disadvantage is due to the fact
  1557. that the hash string need not be composed of words from
  1558. the vocabulary.  Using the vocabulary gives a definite
  1559. structure to the database, helping to keep the game easy
  1560. to add to, maintain and modify.  So, my advice is to use
  1561. hash strings, and take advantage of the extra flexibility
  1562. that they bring, but only if you are satisfied that you
  1563. can't achieve your objective using 'standard' event table
  1564. entries.
  1565.  
  1566.  
  1567. LADDERS AND THINGS.
  1568.  
  1569. Well, the adventure is beginning to take shape.  All that
  1570. remains is to provide a means by which the player can
  1571. enter the church tower to find the treasure...
  1572.  
  1573. The way we are going to make them do this is to climb the
  1574. ladder, whilst in the church.  Then, if they are carrying
  1575. the appropriate key, they will be allowed into the tower.
  1576.  
  1577. The following examples demonstrate the way in which the
  1578. author must try to anticipate the players commands.  For
  1579. example, if we give them a ladder, we must expect them to
  1580. try to climb up it.  It would be silly if the interpreter
  1581. just said "I can't."  Most people can climb ladders!
  1582.  
  1583. There are three situations that we must consider:
  1584.  
  1585. 1)   The player climbs the ladder, in the church, and has
  1586. the key.  They are allowed into the tower.
  1587. 2)   The player climbs the ladder, in the church, but
  1588. does not have the key.  They are not allowed into the
  1589. tower.
  1590. 3)   The player climbs the ladder, but is not in the
  1591. church.  We are going to make them fall off, and send
  1592. them to the hospital.
  1593.  
  1594. First of all, as always, we must add to the vocabulary.
  1595. The word we need is CLIMB.
  1596.  
  1597. Word      Word value
  1598.  
  1599. CLIMB          1
  1600.  
  1601.  
  1602. Notice that we make CLIMB synonymous with UP, as this
  1603. causes the interpreter to reply as if CLIMB were a
  1604. movement word.  e.g. it will say "I can't go in that
  1605. direction" rather than simply "I can't."
  1606.  
  1607. And we must insert the following messages:
  1608.  
  1609. Message 3
  1610. You climb a couple of rungs up the ladder, which is quite
  1611. a feat, as you can't find anything to rest it against.
  1612. Eventually the inevitable happens, and you fall, bouncing
  1613. your head off the floor, a couple of times.
  1614.  
  1615. Message 4
  1616. You open the tin, and out falls a key.  It's funny, you
  1617. were expecting baked beans or dog food, weren't you?
  1618.  
  1619. Message 5
  1620. You climb the ladder, and discover a trapdoor in the
  1621. ceiling.  It is locked.  Quite excited by this find, you
  1622. return to the floor to regain your breath.
  1623.  
  1624. Message 6
  1625. You climb the ladder, and, using the key that you found
  1626. in the tin, open the trapdoor in the ceiling.
  1627. You carry on through the trapdoor...
  1628.  
  1629.  
  1630. OK, so now you know where we're going to find the key
  1631. too!
  1632.  
  1633. We can now handle the event table entries for the players
  1634. attempts to climb the ladder.
  1635.  
  1636. Taking the three situations in turn:
  1637.  
  1638. 1)   The player climbs the ladder, in the church, and has
  1639. the key.  They are allowed into the tower.
  1640.  
  1641. IF (player types CLIMB LADDER) AND (is in the church) AND
  1642. (the ladder is there) AND (they are carrying the key)
  1643.  
  1644. THEN (display message six), (wait for a key press),
  1645. (transport them to location eight, the tower)  and
  1646. (describe the location)
  1647.  
  1648. We have to enter the following into the event table:
  1649.  
  1650. CLIMB LADDER AT 7 PRESENT 4 CARRIED 5 MESSAGE 6 ANYKEY
  1651. GOTO 8 DESC
  1652.  
  1653.  
  1654. 2)   The player climbs the ladder, in the church, but
  1655. does not have the key.  They are not allowed into the
  1656. tower.
  1657.  
  1658. IF (player types CLIMB LADDER) AND (is in the church) AND
  1659. (the ladder is there) BUT (they do not have the key)
  1660.  
  1661. THEN (display message five)
  1662.  
  1663. We insert the following into the event table:
  1664.  
  1665. CLIMB LADDER AT 7 PRESENT 4 NOTCARR 5 MESSAGE 5
  1666.  
  1667.  
  1668. 3)   The player climbs the ladder, but is not in the
  1669. church.  We are going to make them fall off, and send
  1670. them to the hospital.
  1671.  
  1672. IF (player types CLIMB LADDER) AND (is not in the church)
  1673. BUT (the ladder is at the same location as the player)
  1674.  
  1675. THEN (display message three) AND (wait for a key press)
  1676. THEN (send them to location 9) AND (describe the
  1677. location)
  1678.  
  1679. We insert the following event table entry:
  1680.  
  1681. CLIMB LADDER NOTAT 7 PRESENT 4 MESSAGE 3 ANYKEY GOTO 9
  1682. DESC
  1683.  
  1684.  
  1685. We have already noted that the database can store
  1686. multiple event table entries with the same event words.
  1687. In such a case, the entries are stored IN THE ORDER THAT
  1688. YOU ENTERED THEM.  Whilst it didn't matter in this case,
  1689. it can be important, as after one entry, whether its
  1690. actions were executed or not, execution  can 'fall
  1691. through' to the next.  Using the action DONE at the end
  1692. of an entry can be useful if you particularly want to
  1693. prevent such a fall-through.
  1694.  
  1695. If you now test the adventure you will find that climbing
  1696. the ladder in the church tells you that the trapdoor is
  1697. locked.  Trying to climb it anywhere else ends you up in
  1698. the hospital.
  1699.  
  1700. Now we have to do the bit that lets the player get the
  1701. key out of the tin.  It's really easy..
  1702. .
  1703. We have got the message we need (number four), but don't
  1704. yet have a word for OPENing the tin.  Add the following
  1705. to the vocabulary:
  1706.  
  1707. Word      Word Value
  1708.  
  1709. OPEN      111
  1710.  
  1711.  
  1712. Now we are going to create and destroy some objects.  In
  1713. order to get the key out of the tin we need an event
  1714. table entry along the lines of
  1715.  
  1716. IF (the player types OPEN TIN) AND (they have the closed
  1717. tin) AND (they have the tin opener)
  1718.  
  1719. THEN (make the closed tin go away) AND (make the open tin
  1720. and key appear in its place) AND (display message four)
  1721.  
  1722. Which we do with the event table entry,
  1723.  
  1724. OPEN TIN CARRIED 2 CARRIED 6 DESTROY 2 CREATE 3 CREATE 5
  1725. MESSAGE 4
  1726.  
  1727. And we are nearly there!
  1728.  
  1729. If you test the adventure now, you should be able to get
  1730. the key out of the tin by fetching the tin opener and the
  1731. tin, and typing OPEN TIN.  You will have to pick up the
  1732. key, and then you can try to climb the ladder in the
  1733. church.  If all goes well, you will find yourself in the
  1734. church tower, and the JEWELS should be there.  You can
  1735. pick them up, go back down to the church, but what then?
  1736.  
  1737. If you remember, we said that you had to take the jewels
  1738. back to your bedroom, and hide them under the bed?  Well,
  1739. were going to do that, and were going to do it with the
  1740. status table, just for a change.
  1741.  
  1742. Make the following entry to the STATUS table.
  1743.  
  1744. DROP JEWELS AT 10 CARRIED 1 MESSAGE 7 ANYKEY TURNS END
  1745.  
  1746. How does this work?
  1747.  
  1748. IF (the player is at location ten) and (they are carrying
  1749. the jewels)
  1750.  
  1751. THEN (display message seven), (wait for a key press),
  1752. (display the turns count) AND (that the end of the game,
  1753. so ask if they want to play again.)
  1754.  
  1755. But I'm sure you can work that out for yourself by now.
  1756.  
  1757. Well, in a way the game is complete.  You can play it,
  1758. and you can win it.  In some ways the game is far from
  1759. finished.  What happens if you try to buy a kitchen?  If
  1760. you stand in the road for too long, will you be injured
  1761. by a passing bus?
  1762.  
  1763. When you have finished a game, you should be satisfied
  1764. that the interpreter will give a sensible response to
  1765. anything the player might reasonably try to do.  It is
  1766. these final touches that make a game a pleasure to play.
  1767. If the player swears at the interpreter, do they get
  1768. locked in a dark hole?
  1769.  
  1770. Let's add one last thing to the game.
  1771.  
  1772. So far we have done things with objects, but we have
  1773. somewhat neglected the four hundred user flags that
  1774. Advent maintains for us.  Remember, a flag is just like a
  1775. box that we can store a number in.  Programmers will like
  1776. to think of them as variables, but then, a variable is
  1777. just a box that we can put numbers in!
  1778. We have come across some flags already.  Flag 1 is the
  1779. darkness flag, and by changing the value that it holds we
  1780. can control whether the player can see.  We have also
  1781. seen that the number of turns taken is stored in flags
  1782. fifty-five and fifty-six.  These are SPECIAL PURPOSE
  1783. FLAGS.  The job they do has already been defined, and you
  1784. cannot change it.
  1785.  
  1786. Most of the other flags are MULTI PURPOSE to a greater or
  1787. lesser extent.  Some of them count down automatically,
  1788. some of them count down if it is dark, some are decreased
  1789. every time a location is described, many of them do not
  1790. change unless you tell them to, and so on.
  1791.  
  1792. The FLAG NUMBERS that correspond to these different
  1793. functions are listed in Appendix 1.
  1794.  
  1795. We are going to use a flag that counts down every turn
  1796. (Flag 60) to create a situation whereby after falling off
  1797. the ladder, we are not allowed out of the hospital for
  1798. four turns.
  1799.  
  1800. How do we do that?
  1801.  
  1802. We preset the value of the flag to four as the player
  1803. falls.  After four subsequent turns the value has fallen
  1804. to zero.
  1805.  
  1806. Amend the event table entry for CLIMB LADDER, so that the
  1807. entry which handles falling off the ladder becomes:
  1808.  
  1809. CLIMB LADDER NOTAT 7 PRESENT 4 LET 60 4 MESSAGE 3 ANYKEY
  1810. GOTO 9 DESC
  1811.  
  1812. This addition merely makes the value of flag 60 equal
  1813. to four when the player falls.
  1814.  
  1815. We will replace the movement table entry for getting out
  1816. of the hospital with an entry in the event table which
  1817. tests the value of the flag before letting us out.
  1818.  
  1819. So, amend the movement table entry for location nine (the
  1820. hospital) so that it is blank.
  1821.  
  1822. Then we add one last message.
  1823.  
  1824. Message 8
  1825. The nurse pokes you with the sharp end of her syringe.
  1826. "Back to bed!" she cries, "You've had a nasty fall."
  1827.  
  1828. Then two event table entries, one to handle the situation
  1829. when you aren't allowed out of the hospital, and one to
  1830. let you out when you have had your four turns:
  1831.  
  1832. EAST * AT 9 NOTZERO 60 MESSAGE 8
  1833.  
  1834. and
  1835.  
  1836. EAST * AT 9 ZERO 60 GOTO 4 DESC
  1837.  
  1838.  
  1839. You will be able to see how these work.  Test the
  1840. adventure, and use diagnostics to watch the value of flag
  1841. 60.  Notice that it is decreased every turn, immediately
  1842. after you make your input.  This means that you are
  1843. allowed out on the fourth attempt.
  1844.  
  1845. You will probably find, like I do, that a certain amount
  1846. of trial and error is required before you get all your
  1847. flags counting just the right numbers!
  1848.  
  1849. And that really is all we are going to do.
  1850.  
  1851. There are loads of other conditions and actions that we
  1852. have  not used in this simple game.  The ones that we
  1853. have used are probably the ones that you will use most
  1854. often.  The others you may use only occasionally, but
  1855. can be very useful.  In particular there are a number of
  1856. conditions and actions concerned with manipulating the
  1857. values stored in flags.  They are all listed in the
  1858. second part of this manual with a detailed description of
  1859. exactly how they work.
  1860.  
  1861. Some particular commands that are handy (just to whet
  1862. your appetite) are:
  1863.  
  1864. SWAP, to exchange the positions of two objects.
  1865.  
  1866. PLACE, to put an object in a specific location.  Create
  1867. scary monsters that wander around the game!
  1868.  
  1869. LOAD and SAVE, allow the user to save their game position
  1870. to disk. An essential if you are writing large games that
  1871. might take a long time to solve.
  1872.  
  1873. CHANCE, a condition that is satisfied some of the time!
  1874. You can create games that are different every time you
  1875. play, or change the route that your monster takes!
  1876.  
  1877.  
  1878. BEFORE YOU EMBARK ON YOUR OWN PROJECT...
  1879.  
  1880. A few words of advice!
  1881.  
  1882. Be sure to read through the rest of this manual.  You can
  1883. only really be in control of the situation if you
  1884. understand how Advent is working, and why it behaves the
  1885. way it does.
  1886.  
  1887. Plan your adventure carefully.  It is tempting to turn on
  1888. the computer start entering data, but more than likely
  1889. you will make a real mess.  You'll get your event and
  1890. status table entries in the wrong order, lose track of
  1891. what flag does what, and generally do a bad job.  Get at
  1892. least an outline not only of the map, but also of the
  1893. problems you are going to set, written down on paper
  1894. before you even turn the computer on.
  1895.  
  1896. Read Appendix 5 and the notes at the beginning of this
  1897. document before you sell your finished adventure.
  1898.  
  1899.  
  1900. RUNNING A COMPLETED GAME.
  1901.  
  1902. When your game is finished, it is not very desirable to
  1903. have to load the Advent database editor every time you
  1904. want to run it.  Instead, the program PLAYA.EXE is called
  1905. directly.
  1906.  
  1907. At the DOS command line type:
  1908.  
  1909. PLAYA GAMENAME
  1910.  
  1911. Where GAMENAME is the filename of the game that you wish
  1912. to play.  GAMENAME may include standard disk drive and
  1913. directory specifications.
  1914.  
  1915. When you are playing a game in this way, there are no
  1916. options for diagnostics, and there are no added (*)
  1917. commands.  Execution begins straight away at location
  1918. one.  You should make sure your game has a QUIT or
  1919. similar command envoking the END action, or you will not
  1920. be able to stop playing if you want to.
  1921. __________________________________________________________
  1922. __________________________________________________________
  1923.  
  1924.  
  1925. ADVENT USER MANUAL - PART 3.
  1926. INTERPRETER AND LANGUAGE REFERENCE.
  1927.  
  1928.  
  1929. RUNNING ADVENT.
  1930. The Advent database editor program, ADVENT.EXE is started
  1931. by typing:
  1932.  
  1933. ADVENT
  1934.  
  1935. at the DOS prompt.  Adding the command line switch /Q
  1936. will run Advent in 'quiet mode' if you prefer not to have
  1937. Advent beep at you.  This is particularly useful if your
  1938. computer, like mine, has an over enthusiastic
  1939. loudspeaker:
  1940.  
  1941. ADVENT /Q
  1942.  
  1943.  
  1944. Advent, on loading will prompt you for a filename.  If
  1945. the file that you specify exists, Advent will attempt to
  1946. load it.  Otherwise you will be given the option of
  1947. creating an adventure of that name.  If you create a new
  1948. game there may be a slight delay while Advent builds the
  1949. index and initial data files.
  1950.  
  1951. You will then be presented with the main menu screen.
  1952. The use of the menus and the Advent database editor is
  1953. demonstrated in part one of this manual.
  1954.  
  1955.  
  1956. A DESCRIPTION OF THE ADVENT DATABASE.
  1957.  
  1958. THE VOCABULARY.
  1959.  
  1960. The vocabulary contains the list of words that the
  1961. interpreter will understand.  Each word is allocated a
  1962. Word Value by the user.  Words with the same word values
  1963. are synonyms, i.e. they are considered to have the same
  1964. meaning by the editor and interpreter.
  1965.  
  1966. Words associated with movements should be given word
  1967. values LESS THAN 21.  This allows the interpreter to give
  1968. sensible messages when the player tries to move, e.g. 'I
  1969. can't go in that direction' rather than 'I can't.'
  1970.  
  1971. Words associated with objects that can be worn should be
  1972. given word values in the range 21 to 99 inclusive.  These
  1973. words will show as GDWR in the object word table, rather
  1974. than just GD.
  1975.  
  1976. Word values of 100 and greater can be used for any word,
  1977. including verbs, and objects which can be manipulated but
  1978. not worn.  The largest word value permitted is 2000.
  1979.  
  1980.  
  1981. THE MESSAGE TEXTS.
  1982.  
  1983. This table stores the messages which are used in the
  1984. adventure.  The first message is number one.
  1985.  
  1986.  
  1987. THE LOCATION TEXTS.
  1988.  
  1989. This table stores the texts which describe the locations
  1990. in the adventure.  Numbering begins at number one, which
  1991. is the location where the player begins the game.
  1992.  
  1993.  
  1994. THE MOVEMENT TABLE.
  1995.  
  1996. Entries are created automatically in this table for every
  1997. location which is defined in the location texts.  The
  1998. entry for a particular location defines the exits from
  1999. that location with entries in the form:
  2000.  
  2001. WORD NUMBER WORD NUMBER ... WORD NUMBER
  2002.  
  2003. The words must be words from the vocabulary, and the
  2004. number following that word is the location to which the
  2005. player will be moved when they type the word or one of
  2006. its synonyms as the first word of their command.  The
  2007. number must be a valid location number.
  2008.  
  2009. If a word is removed from the vocabulary, such that no
  2010. synonyms remain, any movement table entry using that word
  2011. will be reset.
  2012.  
  2013. If movements are handled in the event or status tables,
  2014. i.e. using GOTO, then the movement table should not
  2015. include those movements.
  2016.  
  2017.  
  2018. THE OBJECT TEXTS.
  2019.  
  2020. This table stores the description texts for objects in
  2021. the game.  Any item that can be moved around or otherwise
  2022. manipulated should be defined as an object.
  2023.  
  2024. Note that object one is a special case in that it is
  2025. treated as a source of light by the interpreter, i.e. it
  2026. cannot be dark if object one is present.  Object one will
  2027. usually be described as a torch or lamp.
  2028.  
  2029.  
  2030. THE OBJECT START LOCATIONS.
  2031.  
  2032. At the beginning of the game the objects are placed at
  2033. locations as defined in this table.  A valid start
  2034. location is any valid location number, or one of three
  2035. special cases: Not Created, Carried or Worn.
  2036.  
  2037. When an object is defined in the object text table its
  2038. start location is automatically set to Not Created.
  2039.  
  2040.  
  2041. THE EVENT TABLE.
  2042.  
  2043. The event table defines the way the interpreter should
  2044. react to typed commands by the player.  The form of the
  2045. entries is as follows:
  2046.  
  2047. WORD1 WORD2 CONDITIONS ACTIONS
  2048.  
  2049. Where WORD1 and WORD2 are words from the vocabulary, and
  2050. CONDITIONS and ACTIONS are chosen from those conditions
  2051. and actions implemented by Advent.  CONDITIONS are
  2052. optional, as in fact are ACTIONS but it is unlikely that
  2053. an entry without actions would be used.
  2054.  
  2055. Words one and two may be optionally replaced with the
  2056. wildcard character '*'.  Typically, word two will be a
  2057. wildcard to signify that the players command will be a
  2058. single word.
  2059.  
  2060. The actions listed will only be executed if the players
  2061. command matches the event words WORD1 and WORD2, and the
  2062. list of conditions are satisfied.
  2063.  
  2064. As an alternative to the event words, a hash string may
  2065. be entered.  This consists of the hash character '#'
  2066. followed by a number of words (usually three or more)
  2067. separated by spaces.  The actions will then be executed
  2068. only if each of the words in the hash string are found in
  2069. the players command, in the order that they appear in the
  2070. hash string, and the conditions are also satisfied.  The
  2071. use of hash strings is discussed in part one of this
  2072. manual.
  2073.  
  2074.  
  2075. THE STATUS TABLE.
  2076.  
  2077. The status table is similar to the event table in that it
  2078. contains lists of conditions and actions in the form:
  2079.  
  2080. WORD1 WORD2 CONDITIONS ACTIONS
  2081.  
  2082. The Status Words, WORD1 and WORD2 are used to identify
  2083. the entries and to position them in the table but are not
  2084. matched to players inputs.  Thus, the actions in a status
  2085. table entry will be executed simply when the list of
  2086. conditions is satisfied.
  2087.  
  2088. Obviously, hash strings are not used in the Status Table.
  2089.  
  2090. The status table is tested between the players turns and
  2091. can be used to cause things to happen that
  2092. are not initiated by the player.
  2093.  
  2094.  
  2095. THE SYSTEM MESSAGES.
  2096.  
  2097. These texts are preset to defaults, and are used by the
  2098. interpreter to communicate with the player.  Their use is
  2099. identified in the description of the interpreter.  It is
  2100. possible to edit these texts to suit you preferences and
  2101. to customise your games, but you should always keep the
  2102. meaning of the messages the same.
  2103.  
  2104.  
  2105. THE OBJECT WORD TABLE.
  2106.  
  2107. The Object Word table stores a word for each object that
  2108. has been defined in the Object Text table.  The entry is
  2109. initially set to 'Not Defined' but can be changed to any
  2110. word in the vocabulary.  The word can then be used by the
  2111. powerful AUTOG, AUTOD, AUTOW and AUTOR actions to
  2112. identify objects in the event table.  For objects that
  2113. can be worn and removed, the object word should be a word
  2114. with a word number between 21 and 99 inclusive.
  2115.  
  2116.  
  2117. FLAGS.
  2118.  
  2119. Flags in Advent are a bit like `variables' in
  2120. programming, but are really very simple.  Each flag can
  2121. be thought of as a store which can hold a whole number,
  2122. from zero to 32767 (which is significant in computing).
  2123. There are four hundred such flags available in Advent,
  2124. some of which have special uses, and others which do not.
  2125. They are identified by their number, from 1 to 400.
  2126.  
  2127. The ACTIONS in the event and status tables allow control
  2128. of the numbers stored in the flags whilst the game is in
  2129. progress, for example by adding to their values, or
  2130. subtracting from them.  Some of the CONDITIONS allow the
  2131. comparison of flags using less than, greater than or
  2132. equal to conditions.
  2133.  
  2134. Some flags are free for you to have complete control
  2135. over, that is, any change to them must be made through
  2136. either the event or status table entries.  Some flags
  2137. have more specialised uses, for example, some count down
  2138. every time the player takes a turn, some count down only
  2139. if it is dark, and one stores the players current
  2140. location.  These special flags are listed in Appendix 1.
  2141.  
  2142.  
  2143. CONDITIONS IN THE EVENT AND STATUS TABLES.
  2144.  
  2145. Conditions in the status and event tables are satisfied
  2146. as follows:
  2147.  
  2148. ATGT lnumber.       Satisfied when the current location
  2149.                     number is greater than lnumber.
  2150.  
  2151. ATLT lnumber.       Satisfied when the current location
  2152.                     number is less than lnumber.
  2153.  
  2154. AT lnumber.         Satisfied if the current
  2155.                     location number is the same as
  2156.                     lnumber.
  2157.  
  2158. NOTAT lnumber.      Satisfied if the current location
  2159.                     number is not the same as lnumber.
  2160.  
  2161. PRESENT onumber.    Satisfied when object onumber is at
  2162.                     the current location.
  2163.  
  2164. ABSENT onumber.     Satisfied when the object
  2165.                     onumber is not at the current
  2166.                     location.
  2167.  
  2168. CARRIED onumber.    Satisfied when object onumber is
  2169.                     being carried.
  2170.  
  2171. NOTCARR onumber.    Satisfied when object onumber is not
  2172.                     carried.
  2173.  
  2174. WORN onumber.       Satisfied if object onumber is
  2175.                     currently worn.
  2176.  
  2177. NOTWORN onumber.    Satisfied if object onumber is not
  2178.                     worn.
  2179.  
  2180. CHANCE number.      Satisfied if number is less than a
  2181.                     computer generated pseudo-random
  2182.                     number between one and one hundred.
  2183.  
  2184. GT fnumber value.   Satisfied if the value of flag
  2185.                     fnumber is greater than value.
  2186.  
  2187. LT fnumber value.   Satisfied when the value of flag
  2188.                     fnumber is less than value.
  2189.  
  2190. EQ fnumber value.   Satisfied if the value of flag
  2191.                     fnumber is equal to value.
  2192.  
  2193. ZERO fnumber.       Satisfied if flag fnumber is equal to
  2194.                     zero.
  2195.  
  2196. NOTZERO fnumber.    Satisfied when flag fnumber has
  2197.                     any value other than zero.
  2198.  
  2199. Each of the conditions available in Advent are simple,
  2200. but by combining them in event and status table entries,
  2201. complicated systems can be developed, for example, the
  2202. entry:
  2203.  
  2204. ATGT 12 ATLT 32 EQ 45 12 EQ 377 12 GT 6 2 CARRIED 4
  2205. CARRIED 2 MESSAGE 3
  2206.  
  2207. will display the message only if the player is in a room
  2208. numbered between 13 and 31 inclusive, is carrying objects
  2209. two and four, flag 45 is equal to 12, flag 377 is equal
  2210. to twelve, and flag 6 has a value larger than two.  There
  2211. is no limit to the complexity of an entry other than the
  2212. length of the expression.
  2213.  
  2214.  
  2215. ACTIONS IN THE EVENT AND STATUS TABLES.
  2216.  
  2217. When the words and conditions of an event or status table
  2218. entry have been satisfied the actions are executed.  The
  2219. following actions are supported by Advent:
  2220.  
  2221. DESC.               A jump is made to the beginning
  2222.                     of the interpreter loop, table
  2223.                     processing is stopped and the current
  2224.                     location is described.
  2225.  
  2226. DONE.               This action is used to end
  2227.                     processing of the particular table in
  2228.                     which it is executed.  It is useful
  2229.                     if you want to prevent processing of
  2230.                     subsequent entries even though their
  2231.                     conditions may be satisfied.
  2232.  
  2233. OK.                 System message number 16 "OK." is
  2234.                     printed before action DONE is
  2235.                     performed.
  2236.  
  2237. MESSAGE mnumber.    The message mnumber is printed.
  2238.  
  2239. ANYKEY.             System message 17, prompting for a key to
  2240.                     be pressed is displayed at the bottom
  2241.                     of the screen.  Execution of the game
  2242.                     pauses until a key press is detected.
  2243.  
  2244. SAVE.               A filename is prompted for, and
  2245.                     the current game position is saved to
  2246.                     disk, allowing a complete return to
  2247.                     the game as it was left in a previous
  2248.                     playing session.
  2249.  
  2250. LOAD.               Loads a game position file as
  2251.                     created by the SAVE action.
  2252.  
  2253. INVEN.              The interpreter prints the system
  2254.                     message (10) "I have with me:" and
  2255.                     the object texts of the objects
  2256.                     carried are displayed below.  If an
  2257.                     item is being worn system message 11,
  2258.                     "(worn)" is printed after it.  If no
  2259.                     objects are being carried the system
  2260.                     message (12) "Nothing at all." is
  2261.                     displayed instead.  The action DONE
  2262.                     is performed, halting processing of
  2263.                     the current table.
  2264.  
  2265. PAUSE seconds.      The game pauses for the number
  2266.                     of seconds specified in seconds.
  2267.  
  2268. GOTO lnumber.       The players position is changed to
  2269.                     location lnumber.
  2270.  
  2271. TURNS.              This action displays the number of
  2272.                     turns taken by the player at this
  2273.                     stage of the game.  The message is
  2274.                     composed from system messages
  2275.                     numbered between 18 and 21.  "You
  2276.                     have taken n turns."  Where n is
  2277.                     calculated from the two flags which
  2278.                     store the turns counter (55 and 56).
  2279.  
  2280. SCORE.              The score, s, held in flag 54 is
  2281.                     displayed with the message "You have
  2282.                     scored s%" composed from system
  2283.                     messages 22 and 23.
  2284.  
  2285. REMOVE onumber.     If the player was wearing the
  2286.                     object it's position becomes CARRIED,
  2287.                     and flag 2, the number of objects
  2288.                     carried is increased by one.  If the
  2289.                     player is not wearing the object the
  2290.                     system message 24 "I am not wearing
  2291.                     it" is displayed and DONE is
  2292.                     performed.  If the maximum number of
  2293.                     objects is already being carried the
  2294.                     system message 25, "My hands are
  2295.                     full" is displayed, DONE is
  2296.                     performed, and the object is not
  2297.                     removed.
  2298.  
  2299. GET onumber.        If the object is already worn or
  2300.                     carried by the player system message
  2301.                     26 "I already have it." is displayed
  2302.                     before DONE is performed.  If the
  2303.                     object requested by onumber is not at
  2304.                     the current location, system message
  2305.                     27 is displayed, "It is not here,"
  2306.                     followed by action DONE.  If the
  2307.                     maximum number of objects is already
  2308.                     being carried, system message 28 "I
  2309.                     cant carry any more" is followed by
  2310.                     action DONE.  Otherwise the object is
  2311.                     picked up, ie, it's position is
  2312.                     updated to CARRIED, and flag 2 is
  2313.                     increased by one.
  2314.  
  2315. DROP onumber.       If the player doesn't have the object
  2316.                     system message 29 "I don't have it"
  2317.                     is displayed and action DONE is
  2318.                     performed.  If the object is being
  2319.                     worn, and the player is carrying the
  2320.                     maximum number of objects allowed,
  2321.                     system message 25 "My hands are full"
  2322.                     is followed by action DONE.  In any
  2323.                     other case, the object is placed at
  2324.                     the current location and flag 2 is
  2325.                     decreased by one if the object was
  2326.                     previously carried, rather than worn.
  2327.  
  2328. WEAR onumber.       If the object is already being worn,
  2329.                     system message 30 "I am already
  2330.                     wearing it" is followed by action
  2331.                     DONE.  If the object is not carried,
  2332.                     system message 29 "I do not have it"
  2333.                     is printed, and DONE is performed.
  2334.                     Otherwise, the position of the object
  2335.                     becomes WORN, and flag 2 is decreased
  2336.                     by one.
  2337.  
  2338. AUTOG.              The second word that was recognised
  2339.                     in the players input is searched for
  2340.                     in the object word table.  If it is
  2341.                     found, the object number of that
  2342.                     object is used to invoke the GET
  2343.                     action.  If a match is not found
  2344.                     system message 9 "I can't" is
  2345.                     displayed and action DONE is
  2346.                     performed.
  2347.  
  2348. AUTOD.              As for AUTOG, the object word table
  2349.                     is searched for an entry to match the
  2350.                     second recognised word in the players
  2351.                     input.  If one is found the object
  2352.                     number for that object is used to
  2353.                     invoke the DROP action.  If no match
  2354.                     is found system message "I can't" is
  2355.                     displayed and action DONE is
  2356.                     performed.
  2357.  
  2358. AUTOW.              If the second word in the players
  2359.                     input is not a word associated with a
  2360.                     wearable object, i.e. wordvalue < 21
  2361.                     or wordvalue > 99, the system message
  2362.                     9, "I can't" is displayed and the
  2363.                     DONE action is executed.  If the word
  2364.                     refers to a wearable object the
  2365.                     object word table is searched for a
  2366.                     matching entry.  If no match can be
  2367.                     found, system message 9 is displayed,
  2368.                     and action DONE is executed.
  2369.                     Otherwise, the appropriate object
  2370.                     number is passed to the WEAR action.
  2371.  
  2372. AUTOR.              If the second word in the players
  2373.                     input does not refer to a wearable
  2374.                     object, then system message 9, "I
  2375.                     can't" is displayed and action DONE
  2376.                     is performed.  If the word refers to
  2377.                     a wearable object, the object word
  2378.                     table is searched for a matching
  2379.                     entry.  If no match is found system
  2380.                     message 9 is displayed and action
  2381.                     DONE is executed.  Otherwise, the
  2382.                     appropriate word number is passed to
  2383.                     the REMOVE action.
  2384.  
  2385. DESTROY onumber.    The position of object onumber is
  2386.                     changed to NOT CREATED and flag 2 is
  2387.                     reduced by one if the object was
  2388.                     carried by the player.
  2389.  
  2390. CREATE onumber.     The position of object onumber
  2391.                     is changed to the current location.
  2392.                     If the object was carried it is
  2393.                     dropped, and flag 2 is decremented if
  2394.                     this was the case.  An object that
  2395.                     has been DESTROYed can always be
  2396.                     recreated with CREATE.
  2397.  
  2398. SWAP onumber1 onumber2.
  2399.                     The positions of the two objects are
  2400.                     swapped.
  2401.  
  2402. SET fnumber.        Flag fnumber has it's value set to
  2403.                     32767.
  2404.  
  2405. CLEAR fnumber.      Flag fnumber is reset to zero.
  2406.  
  2407. PLUS fnumber value. Value is added to the number stored
  2408.                     in flag fnumber and the result is
  2409.                     stored in the same flag.  If the
  2410.                     result is a number larger than 32767,
  2411.                     the number 32767 is stored instead.
  2412.  
  2413. MINUS fnumber value.Value is subtracted from the
  2414.                     number stored in flag fnumber, and
  2415.                     the result is stored in the same
  2416.                     flag.  If the result is a negative
  2417.                     number, the value zero is stored
  2418.                     instead.
  2419.  
  2420. LET fnumber value.  The number stored in flag fnumber is
  2421.                     set to value.
  2422.  
  2423. BEEP duration, pitch A tone is produced by the
  2424.                     computers loudspeaker.  Duration is
  2425.                     measured in 100ths of a second, and
  2426.                     frequency is measured in Hertz.
  2427.  
  2428. CLS.                The screen is cleared to black.
  2429.  
  2430. DROPALL.            Any objects which the player is
  2431.                     carrying or wearing are dropped at
  2432.                     the current location, flag 2 is set
  2433.                     to zero.
  2434.  
  2435. PLACE onumber lnumber.
  2436.                     The position of object onumber is
  2437.                     changed to location lnumber.  If the
  2438.                     player was carrying or wearing the
  2439.                     object, flag 2 is decremented.
  2440.  
  2441. QUIT.               "Are you sure you want to quit?"
  2442.                     (System message 13) is displayed and
  2443.                     the player has to reply.  The first
  2444.                     letter of the reply is tested against
  2445.                     the first letter of system message
  2446.                     number 31.  If the letters are the
  2447.                     same processing of the conditions
  2448.                     continues, otherwise DONE is
  2449.                     performed to finish processing the
  2450.                     current table.  The system messages
  2451.                     31 and 32 are never displayed but
  2452.                     store affirmative and negative
  2453.                     responses.  They will typically be
  2454.                     "Y" and "N", but can be changed,
  2455.                     perhaps to a foreign language.  For
  2456.                     example if the rest of the game is
  2457.                     written in French, the user might be
  2458.                     expected to answer "O" for the
  2459.                     affirmative rather than "Y", in which
  2460.                     case these messages would store "O"
  2461.                     and "N" respectively.
  2462.  
  2463. END.                This is the `way out' of the game.
  2464.                     The system message 14, "Do you want
  2465.                     to try again?" is printed and the
  2466.                     players response is processed as
  2467.                     described for QUIT.  If the answer is
  2468.                     negative the processing jumps to DOS,
  2469.                     (or the Advent main menu, if you are
  2470.                     in TEST ADVENTURE mode).  Otherwise
  2471.                     (affirmative response) the game
  2472.                     begins again.
  2473.  
  2474.  
  2475. A DESCRIPTION OF THE INTERPRETER.
  2476.  
  2477. This section describes how the program PLAYA.EXE uses
  2478. your data to play a game.
  2479.  
  2480. This description is given in sufficient detail to allow
  2481. game writers to get the most from Advent.
  2482. The interpreter can be considered as a large loop, a
  2483. repeating sequence of events as described below.
  2484. The interpreter begins by describing a
  2485. location, and this can be considered the beginning of the
  2486. loop.
  2487.  
  2488. The description of the location that the player is
  2489. currently at is displayed on the screen.  The flags are
  2490. adjusted, i.e. they are incremented or decremented as
  2491. described elsewhere.
  2492. The system message (2) "I can see" is displayed and the
  2493. objects at that location are described with their object
  2494. texts.  If there are no objects present then the system
  2495. message is not displayed.
  2496. If it is dark (flag 1 is not zero) and object 1 is not
  2497. present, the location and object texts are not displayed,
  2498. and the system message (1) "It is dark, I cannot see." is
  2499. printed instead.  Note that object 1 is considered a
  2500. source of light.
  2501.  
  2502. The interpreter then begins processing the status table.
  2503. The first entry is taken and its conditions tested.  If
  2504. the conditions are met then the associated actions will
  2505. be performed.  If the conditions are not met, or when the
  2506. actions have been performed, the next entry is
  2507. considered.  This continues until every entry has been
  2508. tested.
  2509. Exceptions to this are when an action DESC is
  2510. encountered, when the interpreter jumps back to the
  2511. beginning of its loop, or when DONE is encountered, when
  2512. no more status entries are considered.
  2513.  
  2514. Next the player is asked for an entry, with one of the
  2515. system messages (3, 4, 5 or 6) randomly chosen for use as
  2516. a prompt.  The flags are processed again at this time, as
  2517. described elsewhere.  The player then enters their
  2518. command.
  2519.  
  2520. The interpreter searches the vocabulary for the words in
  2521. the players command.  The first two words in the players
  2522. entry which can be matched with words in the vocabulary
  2523. are stored, and processing continues.
  2524. For example, the entry, GET THE HAT would be stored as
  2525. GET HAT, provided that the word THE is not in the
  2526. vocabulary whilst GET and HAT are.  Supposing that the
  2527. word THE was also found in the vocabulary, the entry GET
  2528. THE HAT will be interpreted as GET THE, from which very
  2529. little meaning can be extracted.  It is up to the game's
  2530. author to include whatever words they like in the
  2531. vocabulary, and situations such as the above can be
  2532. avoided by careful planning.  Usually `little' words like
  2533. THE, GO and ON are not included.
  2534.  
  2535. If the entry is not found, and the entry is not
  2536. recognised as a valid `HASH STRING' then the interpreter
  2537. displays the system message (7) "I don't understand."
  2538. Hash strings are described in Part 2 of this manual,
  2539. under the sub heading 'Hash Strings.'
  2540.  
  2541. When an entry is found the movement table is consulted.
  2542. If the first recognised word is defined as a movement
  2543. word for the current location, the player is moved to the
  2544. appropriate place, and the interpreter jumps to the
  2545. location description.  The movement table is not
  2546. consulted if the command has already been identified as a
  2547. hash string.
  2548.  
  2549. If not found in the movement table the entry is passed to
  2550. the EVENT table.  This process is similar to the status
  2551. table search, but in addition to the matching of
  2552. conditions, the players entry must also match the `Event
  2553. words' or hash string associated with a particular entry
  2554. before its actions will be executed.  If matched
  2555. correctly the actions for that entry are performed, with
  2556. DESC and DONE having identical effect to that in the
  2557. status table.  Notice also that some other actions may
  2558. cause the interpreter to end event or status table
  2559. processing, as described in Part 3 of this manual under
  2560. 'Actions in the Event and Status Tables.
  2561. If the players entry cannot be matched the system message
  2562. (9) "I can't go in that direction." is displayed if the
  2563. first word was a movement word.  System message (10) "I
  2564. can't." is displayed if the word was not a movement word.
  2565.  
  2566. The interpreter then returns to the beginning of its loop
  2567. (location description).
  2568.  
  2569.  
  2570. OTHER PROGRAMS SUPPLIED WITH ADVENT:  ADVPACK AND ADVLOCK
  2571.  
  2572. USING ADVPACK.
  2573.  
  2574. The Advent database editor makes 'intelligent' use of the
  2575. space in the data file by keeping track of spare space,
  2576. and using that spare space when it can, rather than
  2577. increasing the size of the file.  This process is still
  2578. not however, 100% efficient, and it is not unusual for
  2579. small spaces to be left in the data file.
  2580.  
  2581. It is also true that the data in the data file is not
  2582. carefully structured.  The entries from the event table
  2583. are not necessarily all stored sequentially, for example.
  2584. Advent is able to cope with this 'disorder' by use of the
  2585. index file, which, just like the index in a book, enables
  2586. items to be found extremely rapidly.
  2587.  
  2588. The interpreter would be able to work even faster if
  2589. tables such as the event and status tables were stored
  2590. sequentially in the data file.  Disk buffering and
  2591. caching systems would also become more effective...
  2592.  
  2593. ADVPACK.EXE can help in both cases.  It packs the data
  2594. into the smallest possible space by removing redundant
  2595. space, and orders entries sequentially for the fastest
  2596. possible access.  It does this without compressing the
  2597. actual data, so it is still possible to edit your game
  2598. using the Advent database editor.
  2599.  
  2600. When should you use ADVPACK?
  2601.  
  2602. Advpack would normally be used when your game is
  2603. complete.  This would ensure that the final version was
  2604. as space and speed efficient as possible.  You may also
  2605. wish to use Advpack occasionally during the development
  2606. of a large game, to keep the size of the database down,
  2607. and to maintain the efficiency of the intelligent
  2608. indexing system.
  2609.  
  2610. Remember to ADVPACK your game when it is complete no
  2611. matter how many times it has been done during
  2612. development.
  2613.  
  2614.  
  2615. RUNNING ADVPACK.
  2616.  
  2617. Before running ADVPACK it is sensible to make a backup of
  2618. your data (.DAT) AND index (.IDX) files, just in case
  2619. something goes wrong.  You should make sure that there is
  2620. free space equal to or greater than the length of your
  2621. data file in the same directory as your index and data
  2622. files.  Advpack will need to create a temporary file.
  2623.  
  2624. Type ADVPACK at the DOS command line to invoke the
  2625. ADVPACK.EXE program.  You will be prompted to enter the
  2626. filename of the game to be packed.  You may enter a drive
  2627. and path specification, but should not enter any file type
  2628. extension as Advpack adds its own.
  2629.  
  2630. If the files are found, and there is enough free space,
  2631. Advpack will go to work.  It indicates on screen the
  2632. blocks of data that it is moving, before finally updating
  2633. the index file.
  2634.  
  2635. At the end of the operation the number of bytes saved are
  2636. displayed, and you are returned to DOS.
  2637.  
  2638.  
  2639. USING ADVLOCK.
  2640.  
  2641. Suppose that you have finished a game and wish to
  2642. distribute it.  Another user of the Advent system could
  2643. load your game into their editor, and make unauthorised
  2644. changes, or steal your ideas, or simply cheat in order to
  2645. complete the game.
  2646.  
  2647. Advlock enables the data and index files to be 'locked'
  2648. so that the Advent editor will refuse to load them.  The
  2649. game can still be played using PLAYA.EXE as normal.
  2650.  
  2651. Using ADVLOCK to lock or unlock a file.
  2652.  
  2653. Type ADVLOCK at the DOS command line to load the program
  2654. ADVLOCK.EXE.  You will be prompted to enter the filename
  2655. of the game that you wish to lock or unlock.  You may
  2656. give a drive or path specification but should not add a
  2657. file type extension, as Advlock add these automatically.
  2658.  
  2659. If the game specified is currently unlocked you will be
  2660. told this and asked to enter a password.  Type carefully,
  2661. and press return to lock the file.  The password that you
  2662. entered will be encrypted into the files, and Advent will
  2663. refuse to allow them to be edited.
  2664.  
  2665. If the game that you specified is currently locked, you
  2666. will be asked to enter the same password that was used to
  2667. lock the files.  Only if you enter the same password will
  2668. the files be unlocked to allow editing.
  2669.  
  2670. When all operations have been completed you will be
  2671. returned to DOS.
  2672.  
  2673.  
  2674. NOTE AND DISCLAIMER:
  2675.  
  2676. Whilst ADVLOCK provides some protection against
  2677. unauthorised changes to your files, it should not be
  2678. considered effective against the determined hacker!  It
  2679. would be sensible to apply the normal Copyright
  2680. protection to any game that you wish to distribute.
  2681.  
  2682. I can accept no responsibility for the effectiveness or
  2683. ineffectiveness of the ADVLOCK system to protect your
  2684. files.  Having said that, it would be asking for trouble
  2685. if you were to distribute a game that had not had ADVLOCK
  2686. protection applied.
  2687.  
  2688.  
  2689.  
  2690. APPENDICES
  2691.  
  2692.  
  2693. APPENDIX 1.
  2694. FLAG LIST:
  2695.  
  2696. Flag number.   Description.
  2697. 1.             Non zero if it is dark.  Zero if light.
  2698. 2.             Number of objects carried.
  2699. 3 - 13.        Decreased when a location is described.
  2700. 14 - 23.       Decreased when a location is described and
  2701.                it is dark.
  2702. 24 - 33.       Decreased when a location is described, it
  2703.                is dark, and object 1 is absent.
  2704. 34 - 44.       Decreased each turn if it is dark.
  2705. 44 - 53.       Decreased each turn if it is dark and
  2706.                object 1 is absent.
  2707. 54.            The player's score.
  2708. 55/56.         Number of turns taken is given by
  2709.                (32768 * Flag 56) + Flag 55.
  2710. 57 - 150.      Decreased each turn.
  2711. 151 - 400.     Ordinary flags.
  2712.  
  2713.  
  2714. APPENDIX 2.
  2715. SUMMARY OF CONDITIONS:
  2716.  
  2717. ATGT lnumber.
  2718. ATLT lnumber.
  2719. AT lnumber.
  2720. NOTAT lnumber.
  2721. PRESENT onumber.
  2722. ABSENT onumber.
  2723. CARRIED onumber.
  2724. NOTCARR onumber.
  2725. WORN onumber.
  2726. NOTWORN onumber.
  2727. CHANCE number.
  2728. GT fnumber value.
  2729. LT fnumber value.
  2730. EQ fnumber value.
  2731. ZERO fnumber.
  2732. NOTZERO fnumber.
  2733.  
  2734.  
  2735. APPENDIX 3.
  2736. SUMMARY OF ACTIONS:
  2737.  
  2738. DESC.
  2739. DONE.
  2740. OK.
  2741. MESSAGE mnumber.
  2742. ANYKEY.
  2743. SAVE.
  2744. LOAD.
  2745. INVEN.
  2746. PAUSE seconds.
  2747. GOTO lnumber.
  2748. TURNS.
  2749. SCORE.
  2750. REMOVE onumber.
  2751. GET onumber.
  2752. DROP onumber.
  2753. WEAR onumber.
  2754. AUTOG.
  2755. AUTOD.
  2756. AUTOW.
  2757. AUTOR.
  2758. DESTROY onumber.
  2759. CREATE onumber.
  2760. SWAP onumber1 onumber2.
  2761. SET fnumber.
  2762. CLEAR fnumber.
  2763. PLUS fnumber value.
  2764. MINUS fnumber value.
  2765. LET fnumber value.
  2766. BEEP duration, pitch
  2767. CLS.
  2768. DROPALL.
  2769. PLACE onumber lnumber.
  2770. QUIT.
  2771. END.
  2772.  
  2773.  
  2774. APPENDIX 4.
  2775. ADVENT DATA FILES.
  2776.  
  2777. Advent stores the information required for the adventure
  2778. game in two disk files.  One of these, with the .DAT
  2779. suffix contains the data for the adventure.  The .DAT
  2780. file holds data with no definite structure, so in order
  2781. that the program knows where to find the information it
  2782. needs, the .IDX file holds a complete index to the data
  2783. file.  The .IDX file is highly structured, allowing
  2784. advent to find the data it needs with the minimum delay.
  2785. So that players cannot cheat, the data file is coded to
  2786. make it unreadable when loaded into an editor or file
  2787. viewer.
  2788.  
  2789. The INDEXED DATA FILE system used by Advent allows the
  2790. interpreter to find the data it needs in the shortest
  2791. possible time.  On loading an adventure the indexes are
  2792. copied into memory to further speed access.  The
  2793. vocabulary is also stored in the index file, as the
  2794. computer needs to access it frequently.  Data can be read
  2795. much more rapidly from memory than it can from disk.
  2796.  
  2797. The index file has a fixed length of just over 60000
  2798. bytes.  The data file however is just large enough to
  2799. hold the data it contains, and grows accordingly.  Advent
  2800. manages the space in the data file intelligently and
  2801. keeps a record of unused space, which it tries to fill as
  2802. best it can.  the details of a number of such spaces are
  2803. remembered, however small gaps in the data file may be
  2804. ignored or forgotten about, and the utility ADVPACK is
  2805. provided on the Utilities Disk to compress completed data
  2806. files.
  2807.  
  2808.  
  2809. APPENDIX 5.
  2810. DISTRIBUTING YOUR COMPLETED GAME.
  2811.  
  2812. When your game is complete, and you have checked it
  2813. carefully, you may wish to distribute it.  Please be sure
  2814. that you are a registered Advent user before distributing
  2815. your game.
  2816. Remember that you should include a copy of the PLAYA.EXE
  2817. program with the data files that you distribute.
  2818. PLAYA.EXE is Public Domain software as described at the
  2819. beginning of this document.
  2820.  
  2821. The game is then run by typing:
  2822.  
  2823. PLAYA GAMENAME
  2824.  
  2825. at the DOS command line.
  2826.  
  2827. It might be more desirable to begin the game by typing
  2828. its name.  This can be done by executing PLAYA GAMENAME
  2829. from within a batch file or a small .COM program.
  2830.  
  2831. Supposing the game was called Treasure Hunt, and the
  2832. filename of the data and index files was THUNT, a
  2833. suitable batch file might be created with:
  2834.  
  2835. COPY CON TREASURE.BAT
  2836. ECHO OFF
  2837. PLAYA THUNT
  2838. [CTRL-Z]
  2839.  
  2840. Which would create the batch file TREASURE.BAT.  The game
  2841. could then be run by typing TREASURE at the DOS prompt.
  2842.  
  2843. Any charge that you make for the games you create is left
  2844. to your discretion, but please remember that you are
  2845. charging for the parts of the game that you yourself
  2846. created.  You must make no charge for PLAYA.EXE.
  2847. Please note that all files created with ADVENT are marked
  2848. as such, and will be rendered useless by removal of these
  2849. identification marks.
  2850.  
  2851.